> ## Documentation Index
> Fetch the complete documentation index at: https://docs.danubeai.com/llms.txt
> Use this file to discover all available pages before exploring further.

# AWS DynamoDB

> Let agents describe tables and read items with plain JSON, and write on connections you allow

The DynamoDB connector works with plain JSON: keys, items and expression values go in and come out as ordinary objects, and Danube converts them to and from DynamoDB's typed format. Setup and the IAM policy are on the [AWS page](/connectors/aws#dynamodb).

## Tools

| Tool                | What it returns                                                                                     |
| ------------------- | --------------------------------------------------------------------------------------------------- |
| **Test Connection** | The AWS account and identity, and whether it may list tables                                        |
| **List Tables**     | Table names in the region                                                                           |
| **Describe Table**  | Partition and sort keys, global and local secondary indexes, item count, size, billing mode, stream |
| **Get Item**        | One item by its full key, or `found: false`                                                         |
| **Query**           | Items of one partition or index, with key condition and filter; `last_evaluated_key` to continue    |
| **Scan**            | Items across a table, stopping at `max_rows` (default 100, max 1,000)                               |
| **Put Item**        | Creates or replaces an item. `read_write` connections only, confirmed                               |
| **Update Item**     | Applies an update expression and returns the new item. `read_write` only, confirmed                 |
| **Delete Item**     | Deletes an item and returns it. `read_write` only, confirmed                                        |

The write tools accept a `condition_expression`, such as `attribute_not_exists(pk)`; when it is false nothing is written.

## Safety

* **Read-only at the source.** Give the read role only `GetItem`, `Query`, `Scan`, `DescribeTable` and `ListTables`. Danube also refuses the write tools on a `read_only` connection before calling AWS.
* **Scan is capped** at 100 items by default. Scan reads and bills every item it passes, even ones a filter drops, so prefer Query on a key or index for large tables.
* Numbers beyond what JSON represents exactly (above 2^53) come back as strings so no digit is lost.

## Example prompts

* "Describe the `orders` table: keys, indexes and how big it is."
* "Get the order with `pk = customer#42` and `sk = order#0007`."
* "Query the `status-index` for items with status `payment_failed`, newest first, 20 at most."
* "Set `status` to `refunded` on order `customer#42 / order#0007`, only if it is currently `payment_failed`."
