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

# Amazon DynamoDB integration

[Back to list of integrations](https://koreai.mintlify.site/agent-platform/integrations/enterprise-systems.md)

Use the Amazon DynamoDB integration to list and describe tables, read and write items, query and scan data, and delete items through Action Tools.

| Authentication | Actions |
| - | - |
| AWS IAM | ([8](https://koreai.mintlify.site/agent-platform/integrations/enterprise-systems/amazon-dynamodb-integrations#supported-actions)) |

## Supported actions

| Action | Use it to |
| - | - |
| [List Tables](#list-tables) | List DynamoDB table names. |
| [Describe Table](#describe-table) | Retrieve table metadata. |
| [Get Item](#get-item) | Read an item by its primary key. |
| [Put Item](#put-item) | Create or replace an item. |
| [Update Item](#update-item) | Update an item with an update expression. |
| [Delete Item](#delete-item) | Delete an item by its primary key. |
| [Query Items](#query-items) | Query by partition key and optional sort-key expression. |
| [Scan Items](#scan-items) | Scan a table. Prefer Query Items for production workloads. |

## Prerequisites

* An AWS Region and IAM credentials with `dynamodb:ListTables` permission for profile validation and the DynamoDB permissions required by the actions you plan to use.
* For temporary credentials, the session token associated with the access key and secret access key.

## Set up the integration

**1. Prepare AWS IAM credentials**

Ensure the IAM principal has `dynamodb:ListTables` permission and the permissions required for the selected actions. Note the AWS Region and obtain the **Access Key ID** and **Secret Access Key**. Include the **Session Token** when using temporary credentials. See [Using identity-based policies for DynamoDB](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/security_iam_service-with-iam.html).

**2. Create the auth profile**

In **Integrations**, select **Amazon DynamoDB** > **Manage**. On **Project Auth Profiles**, select **New Profile** > **Integration Profile** > **Amazon DynamoDB** > **Continue**. Enter the **Access Key ID**, **Secret Access Key**, and **Region**; add the **Session Token** if required, then create the profile.

**3. Create the action tool**

In **Tools**, select **New Tool** > **Action** > **Amazon DynamoDB** > **Continue**. Select the **Action** and **Auth Profile**, configure the inputs, and select **Create Tool**. Then [assign the tool to an agent](https://koreai.mintlify.site/agent-platform/tools/actions.md#assign-an-action-to-an-agent).

## Action reference

> [accordion] List Tables
>
> | Parameter | Type | Description |
> | - | - | - |
> | `limit` | number | Optional. Defaults to 100; maximum 100. |
> | `exclusiveStartTableName` | string | Optional. Use the previous response's `lastEvaluatedTableName` to fetch the next page. |

> [accordion] Describe Table
>
> | Parameter | Type | Description |
> | - | - | - |
> | `tableName` | string | Name of the table. |

> [accordion] Get Item
>
> | Parameter | Type | Description |
> | - | - | - |
> | `tableName` | string | Name of the table. |
> | `key` | object | Primary key object, such as `{"pk":"user#1","sk":"profile"}`. |
> | `consistentRead` | boolean | Optional. Defaults to `false`. |

> [accordion] Put Item
>
> | Parameter | Type | Description |
> | - | - | - |
> | `tableName` | string | Name of the table. |
> | `item` | object | Item attributes as a JSON object. |
> | `conditionExpression` | string | Optional condition expression for the write. |

> [accordion] Update Item
>
> | Parameter | Type | Description |
> | - | - | - |
> | `tableName` | string | Name of the table. |
> | `key` | object | Primary key object. |
> | `updateExpression` | string | Update expression, such as `SET #name = :name`. |
> | `expressionAttributeNames` | object | Optional expression attribute names. Defaults to `{}`. |
> | `expressionAttributeValues` | object | Optional expression attribute values. Defaults to `{}`. |
> | `conditionExpression` | string | Optional condition expression for the update. |

> [accordion] Delete Item
>
> | Parameter | Type | Description |
> | - | - | - |
> | `tableName` | string | Name of the table. |
> | `key` | object | Primary key object. |
> | `conditionExpression` | string | Optional condition expression for the delete. |

> [accordion] Query Items
>
> | Parameter | Type | Description |
> | - | - | - |
> | `tableName` | string | Name of the table. |
> | `keyConditionExpression` | string | Required partition-key condition and optional sort-key condition. |
> | `expressionAttributeNames` | object | Optional expression attribute names. |
> | `expressionAttributeValues` | object | Optional expression attribute values. |
> | `indexName` | string | Optional secondary index name. |
> | `filterExpression` | string | Optional filter applied to query results. |
> | `limit` | number | Optional. Defaults to 100; maximum 500. |
> | `exclusiveStartKey` | object | Optional. Use the previous response's `lastEvaluatedKey` to fetch the next page. |

> [accordion] Scan Items
>
> | Parameter | Type | Description |
> | - | - | - |
> | `tableName` | string | Name of the table. |
> | `filterExpression` | string | Optional filter applied to scan results. |
> | `expressionAttributeNames` | object | Optional expression attribute names. |
> | `expressionAttributeValues` | object | Optional expression attribute values. |
> | `limit` | number | Optional. Defaults to 50; maximum 200. |
> | `exclusiveStartKey` | object | Optional. Use the previous response's `lastEvaluatedKey` to fetch the next page. |

## Troubleshoot common issues

| Issue | Resolution |
| - | - |
| Profile validation fails | Verify the access key, secret, and Region, and confirm the principal can call `dynamodb:ListTables`. |
| An action returns `AccessDeniedException` | Grant the IAM principal the DynamoDB permissions required for that action and table. |
| **Query Items** returns no expected items | Check the partition-key condition and any sort-key or filter expressions. |
| **Scan Items** is slow | Use **Query Items** when the request can be expressed with a partition key. |

## Related articles

* [Auth profiles](https://koreai.mintlify.site/agent-platform/administration/integrations-settings.md#auth-profiles)
* [Action Tools](https://koreai.mintlify.site/agent-platform/tools/actions.md)
* [DynamoDB documentation](https://docs.aws.amazon.com/amazondynamodb/)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.