Skip to content

DynamoDB ​

Pro

DevDb connects to Amazon DynamoDB, DynamoDB Local and LocalStack.

Connect ​

  1. Under Remote Connections, click Add, then select DynamoDB.
  2. Enter the Region, then select the Authentication:
    • AWS profile: DevDb lists the profiles in ~/.aws/config and ~/.aws/credentials. SSO, credential_process and assume-role profiles work. If the SSO session expired, DevDb tells you to run aws 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.
  3. Optional: enter a Custom Endpoint for DynamoDB Local (http://localhost:8000) or LocalStack (http://localhost:4566). With an endpoint, keys are optional.
  4. Click Test, then click Connect.

Automatic detection (DynamoDB Local) ​

DevDb finds DynamoDB Local in:

  • docker-compose.yml or compose.yml: an amazon/dynamodb-local service, or a localstack/localstack service with DynamoDB enabled.
  • .env: AWS_ENDPOINT_URL_DYNAMODB or DYNAMODB_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 _key column: 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 ​

FilterOperationMatch
On the partition keyQueryExact match. A sort-key filter then matches the start of the value.
On other attributesScanText 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.

DevDb - Zero-config database client for VS Code