AWS DynamoDB database
When using DynamoDB in DuploCloud AWS, the required permissions to access the DynamoDB from a virtual machine (VM), Lambda functions, and containers are provisioned automatically using Instance profiles. Therefore, no Access Key is required in the Application code.
When you write application code for DynamoDB in DuploCloud AWS, use the IAM role/Instance profile to connect to these services. If possible, use the AWS SDK constructor, which uses the region.
Adding DynamoDB Database Tables
In the DuploCloud Portal, navigate to Cloud Services -> Database.
Select the DynamoDB tab.
Click Add. The Create DynamoDB pane displays.

The Create DynamoDB pane Complete the following fields:
Table Name
Enter a name for the table.
Primary Key
Enter the primary key.
Data Type (Primary Key)
Select the data type for the primary key (String or Number).
Sort Key
Enter the sort key.
Data Type (Sort Key)
Select the data type for the sort key (String or Number).
Secondary Indexes
To add a secondary index, click Add Local Index and specify the following: • Sort Key: Enter the attribute used to sort items within the partition. • Data Type: Select the data type of the sort key (e.g., String, Number). • Index Name: Enter a unique name for the secondary index. • Projection: Specify which attributes to include in the index (e.g., All, Only Keys, or Include and enter a specific attribute).
Click Submit.
For detailed guidance about configuring the duplocloud_aws_dynamodb_table, refer to the Terraform documentation. This resource allows for creating and managing AWS DynamoDB tables within DuploCloud.
After creating a DynamoDB table, you can retrieve the final name of the table using the .fullname attribute, which is available in the read-only section of the documentation. This feature is handy for applications that dynamically access table names post-creation. If you encounter any issues or need further assistance, please refer to the documentation or contact support.
Last updated
Was this helpful?

