DynamoDB
DynamoDB is a managed non-relational database service provided by Amazon. ToolJet has the capability to connect to DynamoDB for reading and writing data.
Connection
To establish a connection with the DynamoDB data source, you can either click on the +Add new data source
button located on the query panel or navigate to the Data sources page through the ToolJet dashboard.
![DynamoDB](/img/datasource-reference/dynamoDB/dynamogds.gif)
ToolJet supports connecting to DynamoDB using three methods: IAM credentials, AWS Instance Profile, or AWS ARN Role.
When using IAM credentials, you will need to provide the following information:
- Region
- Access key
- Secret key
It is recommended to create a dedicated IAM user for the database in order to have granular control over ToolJet's access levels.
![ToolJet - DynamoDB connection](/img/datasource-reference/dynamodb/iam.png)
To connect to DynamoDB using an AWS Instance Profile, select the option to Use AWS Instance Profile. This will utilize the IAM role attached to the EC2 instance where ToolJet is running. The WebIdentityToken parameter obtained from a successful login with an identity provider is used to access the metadata service of an ECS container and the EC2 instance.
![ToolJet - DynamoDB connection](/img/datasource-reference/dynamodb/awsinstance.png)
If you prefer to use an AWS ARN Role, you will need to provide the following details:
- Region
- Role ARN
![ToolJet - DynamoDB connection](/img/datasource-reference/dynamodb/arn.png)
Click the Test connection button to verify the correctness of the provided credentials and the accessibility of the database to the ToolJet server. Finally, click the Save button to save the data source configuration.
Querying DynamoDB
To perform queries on DynamoDB, click the +
button in the query manager located at the bottom panel of the editor. Select the previously added database as the data source for the query. Choose the desired operation and click 'Save' to store the query.
![ToolJet - DynamoDB connection](/img/datasource-reference/dynamodb/queries.png)
To execute the query, click the 'Run' button. Note that the query must be saved before running.
You can apply transformations to the query results. Refer to our transformations documentation for more information: link
- List Tables
- Get Item
- Query Table
- Scan Table
- Delete Item
- Update Item
- Describe Table
- Create Table
- Put Item
List Tables
Returns an array of table names associated with the current account and endpoint. The output from List Tables is paginated, with each page returning a maximum of 100 table names.
![ToolJet - DynamoDB operations](/img/datasource-reference/dynamodb/listtables.png)
Get Item
Retrieves a single item from a table. You must specify the primary key for the item that you want. You can retrieve the entire item, or just a subset of its attributes.
Required parameters:
- Table
- Key name
Syntax for Key name:
{
"Key": {
"ForumName": {
"S": "Amazon DynamoDB"
},
"Subject": {
"S": "How do I update multiple items?"
}
}
![ToolJet - DynamoDB operations](/img/datasource-reference/dynamodb/getitem.png)