Connect to Amazon DynamoDB
Connect Amazon DynamoDB to Retool and query, insert, update, and delete items in your tables.
Amazon DynamoDB is a fully managed NoSQL database service that stores data as items in tables.
What you can do with Amazon DynamoDB in Retool
After you create an Amazon DynamoDB resource in Retool, you can:
- Query and scan tables with filters and projections.
- Get, insert, update, and delete individual items.
- Paginate through large result sets automatically.
- Use a visual parameter editor or write parameters as raw JSON.
Before you begin
To connect Amazon DynamoDB to Retool, you need the following:
- Cloud
- Self-hosted
- AWS account: Access to one or more DynamoDB tables.
- AWS credentials: An AWS access key ID and secret access key with permissions to query the target tables, or an IAM role to assume.
- Retool permissions: Ability to create and manage resources in your organization.
- AWS account: Access to one or more DynamoDB tables.
- AWS credentials: An AWS access key ID and secret access key with permissions to query the target tables, an IAM role to assume, or AWS credentials sourced from your Retool instance's environment or underlying instance role.
- Retool permissions: Ability to create and manage resources in your organization.
Create an Amazon DynamoDB resource
Follow these steps to create an Amazon DynamoDB resource in your Retool organization.
Create a new resource
In your Retool organization, navigate to Resources in the main navigation and click Create new → Resource. Search for "DynamoDB" and click the Amazon DynamoDB tile to begin configuration.
Use folders to organize your resources by team, environment, or resource type. This helps keep your resource list manageable as your organization grows.
Configure general settings
Specify a name and description for the resource that indicates which AWS account or tables it connects to. The description provides more context to users and Assist about how to use the resource.
| Example name | Example description |
|---|---|
| Orders table | DynamoDB tables containing order and shipment records. |
| Analytics tables (read only) | Read-only DynamoDB tables used for reporting dashboards. |
Configure resource credentials
Configure the connection settings for your Amazon DynamoDB resource.

Amazon DynamoDB resource configuration form.
AWS region
The AWS region of the DynamoDB tables you want to connect to.
us-east-1
Authentication
Choose an authentication method based on your deployment type and security requirements.
| Authentication method | Use cases |
|---|---|
| AWS access key and secret | Direct authentication with an IAM user's credentials. Available on both Cloud and self-hosted. |
| Default credential provider chain | Sources credentials from environment variables or the underlying instance role. Self-hosted only. |
- Cloud
- Self-hosted
Option A: AWS access key and secret (Recommended)
- Enter the AWS access key ID for an IAM user with permissions to query the target tables.
- Enter the AWS secret key ID that corresponds to the access key. Refer to AWS docs to find access keys.
Option B: Default credential provider chain
Enable Connect using the default credential provider chain to source AWS credentials from environment variables or your Retool instance's underlying instance role, instead of entering an access key and secret directly. Refer to AWS's standardized credentials documentation for details.
Role to assume (ARN)
Optionally, provide the ARN of a different role to assume when accessing DynamoDB, rather than using the permissions attached to the credentials above directly.
arn:aws:iam::123456789012:role/DynamoDBReadOnlyRole
- Cloud
Configure advanced options
Configure optional settings available under the Advanced options section of the resource configuration form.
Outbound region
If your organization uses outbound regions, select the region that should be used for requests to DynamoDB. This controls which geographic region your requests originate from.
Test the connection
Click Test connection to verify Retool can connect to DynamoDB. If the test fails, check the following:
- Credentials: Verify the AWS access key ID and secret key are correct and haven't been deactivated.
- AWS Region: Confirm the region matches where your DynamoDB tables are located.
- Permissions: Ensure the IAM user or assumed role has permissions to list and query the target tables.
After testing the connection, click View in console to open the Debug Tools console. The console displays the test request executed, its response, execution time, and error details if the test fails. This information is helpful for troubleshooting connection issues.
Save the resource
Click Create resource to save your Amazon DynamoDB resource. You can now use it in queries across your Retool apps and automations.
Interact with Amazon DynamoDB data
Once you've created an Amazon DynamoDB resource, you can interact with DynamoDB data using Retool.
Retool recommends using the new app builder so you can use natural language to build React-based apps using AI.
- To use Amazon DynamoDB data in the app builder, reference the resource in the prompt with
@, such as@Orders table. Refer to the data and functions documentation to learn more. - For classic apps, workflows, and agents, refer to the resource query documentation to learn how to write a query.
Best practices
Follow these best practices to maintain the security of your Amazon DynamoDB resource.
- Apply least privilege: Scope the IAM user's or assumed role's policy to only the specific tables and actions (
Query,Scan,GetItem,PutItem,UpdateItem,DeleteItem) your apps need. - Use a role to assume rather than long-lived keys: Where possible, configure Role to assume (ARN) with a role that has a limited session duration, rather than relying solely on long-lived access keys.
- Use resource environments: Configure multiple resource environments to maintain separate AWS credentials or table names for production, staging, and development.
Related resources
Create a resource
Learn how to create and manage resources in Retool.
Resource environments
Configure separate credentials for production and non-production environments.
Connect to Amazon S3
Connect to another AWS service for file storage.
Retool community: Amazon DynamoDB
Community discussions and solutions for Amazon DynamoDB integrations.
Amazon DynamoDB documentation
Official AWS DynamoDB documentation.