DynamoDB
ProDevDb connects to Amazon DynamoDB, DynamoDB Local and LocalStack.
Connect
- Under Remote Connections, click Add, then select DynamoDB.
- Enter the Region, then select the Authentication:
- AWS profile: DevDb lists the profiles in
~/.aws/configand~/.aws/credentials. SSO,credential_processand assume-role profiles work. If the SSO session expired, DevDb tells you to runaws sso login --profile <name>. - Access key: Access Key ID, Secret Access Key and an optional Session Token. DevDb keeps them in the secret storage of your editor and does not write them to logs.
- AWS profile: DevDb lists the profiles in
- Optional: enter a Custom Endpoint for DynamoDB Local (
http://localhost:8000) or LocalStack (http://localhost:4566). With an endpoint, keys are optional. - Click Test, then click Connect.
Automatic detection (DynamoDB Local)
DevDb finds DynamoDB Local in:
docker-compose.ymlorcompose.yml: anamazon/dynamodb-localservice, or alocalstack/localstackservice with DynamoDB enabled..env:AWS_ENDPOINT_URL_DYNAMODBorDYNAMODB_ENDPOINT.
Without -sharedDb, DynamoDB Local keeps a different database for each access key ID and region. Put AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY and AWS_REGION in .env, so that DevDb sees the same tables as your app.
Columns and values
- The partition key (
PK) and sort key (SK) come first. Then DevDb shows each attribute that it finds in the first 200 items. - Column types are DynamoDB types:
S,N,B,BOOL,M,L,SS,NS,BS,NULL. - A table with a sort key gets a
_keycolumn: the full primary key as JSON. Edits and deletes use it. - Maps, lists and sets show as JSON. Binary values show as base64.
- Numbers that JavaScript cannot hold exactly (for example, larger than 2^53) stay as text.
Pages and row count
- DynamoDB pages with a start key, not an offset. DevDb remembers the start key of each page that it reads. If you go far ahead, DevDb scans forward from the nearest known page. This reads all items between them.
- For a table up to 10 MB, DevDb shows an exact count. For a larger table, DevDb shows the DynamoDB
ItemCount. AWS updates it about every 6 hours, so the footer says that the count is approximate.
Filters
| Filter | Operation | Match |
|---|---|---|
| On the partition key | Query | Exact match. A sort-key filter then matches the start of the value. |
| On other attributes | Scan | Text contains the value. Numbers and booleans must be equal. |
TIP
A Scan reads all items and uses read capacity. Filter on the partition key when you can.
Edit and delete
- Edits and deletes use the full primary key.
- They fail if the item does not exist any more.
- You cannot edit key attributes.
MCP
MCP clients use PartiQL through ExecuteStatement. In read-only mode (the default), DevDb accepts only SELECT. INSERT, UPDATE and DELETE need Devdb.mcp.allowWrites.