<a id="cli-aws-amplifygen3-local-db"></a>

# db

## Description

Connect to and inspect the local development stack’s Postgres database.

- `aws amplifygen3 local db token` prints the connection string (with password) for your own psql/GUI client.
- `aws amplifygen3 local db connect` opens an interactive psql shell.
- `aws amplifygen3 local db query` runs a SQL statement and renders the rows.
- `aws amplifygen3 local db lint` type-checks the schema’s plpgsql functions (falling back to catalog smell checks).
- `aws amplifygen3 local db dump` runs pg_dump.
- `aws amplifygen3 local db inspect` runs one read-only diagnostic, such as pg_stat_\*, locks or bloat.
- `aws amplifygen3 local db report` runs every diagnostic and writes one CSV per command.

All but `aws amplifygen3 local db token` require the stack running and Docker installed (the psql/pg_dump client runs in the stack’s container). These commands are local-only.

## Synopsis

```
db
```

## Options

*None*

## Available Commands

* [connect](connect.md)
* [dump](dump.md)
* [inspect](inspect.md)
* [lint](lint.md)
* [query](query.md)
* [report](report.md)
* [token](token.md)
