> ## Documentation Index
> Fetch the complete documentation index at: https://ngquct-docs-fix-500-query-results.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Amazon DynamoDB

> Connect to Amazon DynamoDB with PartiQL queries, GSI/LSI browsing, and DynamoDB Local support

export const name_0 = "DynamoDB"

export const plugin_0 = "DynamoDB Driver"

Opening a table runs a Scan. A filter becomes a Query only when it pins the partition key to a single value with `=`; every other filter is applied to the items after they come back, so it narrows what you see and not what the table read.

The {name_0} driver is not in the app. Picking {name_0} in the **Choose a Database** sheet offers the
download before the form opens, and opening a saved {name_0} connection installs it without asking.
**Settings > Plugins > Browse > {plugin_0}** installs it up front. See [Plugins](/features/plugins).

## Quick setup

Click **Create Connection…**, select **DynamoDB**, choose an **Auth Method**, enter credentials and region, then click **Save & Connect**.

<Frame caption="The DynamoDB connection form with an auth method picked">
  <img className="block dark:hidden" src="https://mintcdn.com/ngquct-docs-fix-500-query-results/hA72m8tSnRe3b-ew/images/dynamodb-connection-form.png?fit=max&auto=format&n=hA72m8tSnRe3b-ew&q=85&s=81877b3f7bbdce775bb0b569318ff045" alt="DynamoDB connection form" width="1560" height="960" data-path="images/dynamodb-connection-form.png" />

  <img className="hidden dark:block" src="https://mintcdn.com/ngquct-docs-fix-500-query-results/hA72m8tSnRe3b-ew/images/dynamodb-connection-form-dark.png?fit=max&auto=format&n=hA72m8tSnRe3b-ew&q=85&s=b0412f4f2adbb731d17f50c9dc7cfcdb" alt="DynamoDB connection form" width="1560" height="960" data-path="images/dynamodb-connection-form-dark.png" />
</Frame>

## Connection settings

The form asks for no host, no port and no database, and offers no SSL/TLS pane. Every request is an HTTPS call to the AWS endpoint signed with SigV4, and one connection sees one region's tables.

| Field               | Description                                                              |
| ------------------- | ------------------------------------------------------------------------ |
| **AWS Region**      | Region the tables live in. Defaults to `us-east-1`                       |
| **Custom Endpoint** | Overrides the endpoint URL. Leave it empty unless you run DynamoDB Local |

## Authentication

| Auth Method                 | Fields                                                                  | Credentials come from                                                                                  |
| --------------------------- | ----------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ |
| **Access Key + Secret Key** | **Access Key ID**, **Secret Access Key**, and **Session Token** for STS | What you type                                                                                          |
| **AWS Profile**             | **Profile Name**                                                        | That profile in `~/.aws/config` and `~/.aws/credentials`, read the way the AWS CLI reads it            |
| **AWS SSO**                 | **Profile Name**                                                        | The IAM Identity Center token cached in `~/.aws/sso/cache`. Run `aws sso login --profile <name>` first |

Pick **AWS Profile** if the AWS CLI already works on this Mac. Static keys, `credential_process` helpers and `role_arn` chains all resolve; the rules are on [AWS IAM Authentication](/connections/aws-iam#profiles).

## DynamoDB Local

```bash theme={null}
docker run -p 8000:8000 amazon/dynamodb-local
```

Set **Auth Method** to Access Key + Secret Key, put any non-empty string in **Access Key ID** and **Secret Access Key**, and set **Custom Endpoint** to `http://localhost:8000`.

## Columns over schemaless items

A table declares only its key attributes, so the grid builds columns from the items it fetched: the union of their attribute names, partition key first, sort key next, the rest alphabetically. An attribute none of those items carries gets no column. Each column's type is a majority vote over the same items; the Structure tab votes on a sample of up to 100.

| Attribute type           | In the cell                                              |
| ------------------------ | -------------------------------------------------------- |
| `S`, `N`, `BOOL`, `NULL` | The value                                                |
| `B`                      | Base64                                                   |
| `L`, `M`                 | DynamoDB-typed JSON, `[{"S":"a"}]` and `{"k":{"S":"a"}}` |
| `SS`, `NS`, `BS`         | A plain JSON array                                       |

An edit is parsed back through the same shape, so keep the typed envelopes when you change a list or a map.

In [Table Structure](/features/table-structure), **Indexes** lists the primary key with every GSI and LSI, and **DDL** prints the key schema, billing mode, capacity, item count, table size and each index's projection.

## PartiQL

The editor runs PartiQL. Table names take double quotes, string values single quotes: `SELECT * FROM "Users" WHERE userId = 'user123'`. Amazon's [PartiQL reference](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ql-reference.html) has the grammar.

Grid edits become PartiQL as well, one `INSERT`, `UPDATE` or `DELETE` per row. A key attribute is never part of a `SET`: to change a key, delete the item and insert it again.

## IAM permissions

The driver calls `ListTables`, `DescribeTable`, `Scan`, `Query` and `ExecuteStatement`, and nothing else. That is this policy:

```json theme={null}
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "dynamodb:ListTables",
        "dynamodb:DescribeTable",
        "dynamodb:Scan",
        "dynamodb:Query",
        "dynamodb:PartiQLSelect",
        "dynamodb:PartiQLInsert",
        "dynamodb:PartiQLUpdate",
        "dynamodb:PartiQLDelete"
      ],
      "Resource": "*"
    }
  ]
}
```

For read-only access, drop `PartiQLInsert`, `PartiQLUpdate` and `PartiQLDelete`.

## Limitations

* Consumed capacity is never reported. Nothing in the app shows what a browse cost; read it in CloudWatch.
* Paging is cursor-based, so page 40 re-scans everything before it.
* A list or map cell is cut at 10,000 characters and ends in `...`. Saving an edit to a cut cell stores the fragment; change long nested values with PartiQL instead.
* Table structure is fixed at creation: no structure editing, no transactions, no import.
* Item counts come from DynamoDB and refresh roughly every six hours, so they lag.
* DAX endpoints are not supported. Leave **Custom Endpoint** empty or point it at a standard endpoint.

## Troubleshooting

### Authentication failed: …

The credentials were rejected: an unrecognized key, a bad signature, or a policy that denies the call. Check the key and secret, the profile name, or the SSO session with `aws sso login --profile <name>`. An aged-out STS session token needs replacing.

### DynamoDB error: \[ResourceNotFoundException] …

The table is not in this region. Tables are regional; set **AWS Region** to the one the table was created in.

### DynamoDB error: \[ProvisionedThroughputExceededException] …

The table's provisioned read capacity is used up. Retry, move the table to on-demand billing, or filter on the partition key so the browse runs as a Query.

## Related

* [AWS IAM Authentication](/connections/aws-iam)
* [Import & Export](/features/import-export)
