View a markdown version of this page

Local console - AWS Amplify

Local console

The local console is a web page for your local AWS Amplify backend. Use it to browse your tables, run SQL, create test users, and read the backend’s logs and request charts. You can also check what an AI coding agent changed: the migrations that it applied, the tables and rows that it created, and the users that it added.

aws amplifygen3 local run starts the console and the local backend on your computer. The console works only with the local backend. For a deployed backend, use the aws amplifygen3 db and aws amplifygen3 backend user commands.

Open the local console

Run the following command in your app’s folder to start the local backend:

aws amplifygen3 local run

The command prints the console’s address as gui_url. You should see http://localhost:54323, or the address on the next free port if another program is using port 54323. Open the address in your browser.

To show the address again, run aws amplifygen3 local status. The CLI also records the address in amplify.local.json.

To choose the port, add --gui-port to aws amplifygen3 local run. If another program is using the port that you choose, the command stops with port_in_use.

The console listens only on 127.0.0.1. Other computers on your network can’t open it.

The console opens on the Overview screen:

The local console’s Overview screen, showing the database and authentication status, database metrics and the local endpoints

To start your coding agent with your local backend’s details, choose Use with your agent at the top of the console, and then choose Copy prompt. Paste the prompt into your agent in your app’s folder. The prompt gives your agent your app’s name, the console and backend addresses, the publishable key’s variable name, the migrations/ folder, the backend.auth block and the Amplify agent skill. It also tells the agent to keep secret values out of code and output, and not to change applied migrations.

Screens

The console has the following screens. To open a screen, add its path to gui_url, such as http://localhost:54323/#/sql.

Screen and address What you do there

Overview at #/overview

See the database’s health, the last migration, the number of your tables and the database’s size, the local endpoints, and sign-ins in the last 24 hours

Database at #/database

See the local database’s status, its last migration and the storage that it uses. Read each migration file’s SQL and status (applied, failed or pending). If a deployment would fail on your migrations/ folder, you see the reason, such as an empty file or a file out of order, and how to fix it on your computer

SQL editor at #/sql

Find your tables in the tree, and choose a table to query its rows. Run SQL, Explain or Explain analyze, and chart the results. Your browser stores your saved queries and history. You confirm each DROP and TRUNCATE before it runs

Authentication at #/auth

List your local users, and create one with Create test user. Use a user’s Actions menu to edit the profile, set a password, sign the user out everywhere, ban or unban the user, or delete the user. Use View sessions to end one of the user’s sessions

Sign-in methods, a tab on the Authentication screen, at #/auth/providers

See the sign-in methods that you turned on in backend.auth

Logs at #/logs

Search the local request and PostgreSQL logs, and download them

Monitoring at #/monitoring

Watch the error rate, p95 latency, 401 responses and request charts, the database’s size, connections and cache hit rate, and active and blocked queries

API keys at #/api-keys

Copy the publishable key hpk_v1.local, the local endpoint and a client snippet. Choose Copy app .env to copy the endpoint and the key

Environment variables at #/env-vars

See the names in .secrets/client_secrets.env and the settings that reference each one, with the values masked

The following image shows the SQL editor with the rows of a notes table:

The local console’s SQL editor, showing the query select * from notes and three rows

The Database screen is read-only. To change a table or its rows, run SQL in the SQL editor. To keep a schema change, write it as a migration file in migrations/. A deployment applies only those files. For more information, see Tables and migrations.

Test RLS policies

You see every row in every table in the SQL editor. Your RLS policies don’t apply there. To check what a signed-in user or a signed-out visitor can read, call the data API as that user or visitor. For more information about testing RLS policies locally, see Local database.

Troubleshooting

Problem What to do

The page doesn’t load at http://localhost:54323

Another program was using port 54323 when the backend started, so the console is on the next free port. Read gui_url from aws amplifygen3 local status

port_in_use

Another program is using the port that you passed to --gui-port. Choose another port, or stop that program

The page doesn’t load at any address

Run aws amplifygen3 local status to check that the backend is running, then run aws amplifygen3 local run

For more information about the local backend, see Develop locally.