New260+ blocks and 240+ tools are now fully documented
Tool

Amazon DynamoDB

Read, write, query, and manage items in Amazon DynamoDB tables

Read, write, update, delete, query, scan, and batch-write items in Amazon DynamoDB. Use it in workflows to persist structured data, look up records by primary key, run key-condition queries on indexes, or bulk-load and purge items in a single round-trip.

Overview

PropertyValue
Typedynamodb
CategoryTool — Database
AuthAWS Access Key ID + Secret Access Key

Operations

OperationTool IDDescription
Get Itemdynamodb_get_itemFetch a single item from a table by its primary key
Put Itemdynamodb_put_itemInsert or fully replace an item in a table
Update Itemdynamodb_update_itemUpdate one or more attributes of an existing item in place
Delete Itemdynamodb_delete_itemRemove an item from a table by its primary key
Querydynamodb_queryReturn items matching a key condition expression, with optional filter and index
Scandynamodb_scanRead every item in a table, with an optional filter expression
Batch Writedynamodb_batch_writeExecute multiple put and delete requests in a single call (up to 25 per request)

Configuration

SettingTypeRequiredDescription
awsRegionstringYesAWS region where the table lives (e.g., us-east-1)
awsAccessKeyIdstringYesSecret. AWS access key ID for the IAM user or role
awsSecretAccessKeystringYesSecret. AWS secret access key paired with the access key ID
tableNamestringYes (all except Batch Write)Name of the DynamoDB table to operate on
keystring (JSON)Yes (Get Item, Update Item, Delete Item)Primary key of the target item as a DynamoDB-typed JSON object, e.g. {"id": {"S": "123"}}
itemstring (JSON)Yes (Put Item)Full item to write as a DynamoDB-typed JSON object, e.g. {"id": {"S": "123"}, "name": {"S": "Alice"}}
updateExpressionstringYes (Update Item)DynamoDB update expression, e.g. SET #n = :name
expressionAttributeValuesstring (JSON)Yes (Update Item, Query)Placeholder values for the expression, e.g. {":name": {"S": "Bob"}}
keyConditionExpressionstringYes (Query)Key condition expression, e.g. id = :id
indexNamestringNo (Query)Name of a global or local secondary index to query against
filterExpressionstringNo (Query, Scan)Filter expression applied after the query or scan to narrow results
limitnumberNo (Query, Scan)Maximum number of items to evaluate (and return) per call
requestItemsstring (JSON)Yes (Batch Write)Map of table name to an array of PutRequest/DeleteRequest objects, e.g. {"MyTable": [{"PutRequest": {"Item": {"id": {"S": "1"}}}}]}

Outputs

Get Item (dynamodb_get_item)

FieldTypeDescription
itemjsonThe retrieved item in DynamoDB-typed format, or null if not found

Put Item (dynamodb_put_item)

FieldTypeDescription
successbooleantrue if the item was written successfully

Update Item (dynamodb_update_item)

FieldTypeDescription
attributesjsonThe updated item attributes returned by DynamoDB (optional, depends on ReturnValues)

Delete Item (dynamodb_delete_item)

FieldTypeDescription
successbooleantrue if the delete request was accepted

Query (dynamodb_query)

FieldTypeDescription
itemsjsonArray of matching items in DynamoDB-typed format
countnumberNumber of items returned in this page
lastEvaluatedKeyjsonPagination key to pass in a subsequent Query call to continue reading; null when exhausted

Scan (dynamodb_scan)

FieldTypeDescription
itemsjsonArray of scanned items in DynamoDB-typed format
countnumberNumber of items returned in this page
lastEvaluatedKeyjsonPagination key to pass in a subsequent Scan call to continue reading; null when exhausted

Batch Write (dynamodb_batch_write)

FieldTypeDescription
unprocessedItemsjsonItems that DynamoDB could not process (empty object {} when all succeeded); retry these

Example

[Starter] → [DynamoDB: Query] → [Agent: summarize results]

Configure the Query block with awsAccessKeyId: {{AWS_ACCESS_KEY_ID}}, awsSecretAccessKey: {{AWS_SECRET_ACCESS_KEY}}, awsRegion: us-east-1, tableName: orders, keyConditionExpression: customerId = :cid, and expressionAttributeValues: {":cid": {"S": "{{starter.customerId}}"}}. The block returns {{dynamodbQuery.items}} — an array of matching orders — which you can pass directly to an Agent block to generate a plain-language summary or trigger downstream logic.

Tips

  • DynamoDB uses typed JSON — every attribute value must include a type descriptor: {"S": "text"} for strings, {"N": "42"} for numbers, {"BOOL": true} for booleans, {"L": [...]} for lists, {"M": {...}} for maps. The key, item, and expressionAttributeValues params all expect this format.
  • Query vs Scan — prefer Query over Scan whenever possible. Query uses the primary key or a secondary index and reads only matching partitions; Scan reads the entire table and is slow and expensive on large tables.
  • Pagination — both Query and Scan return at most limit items per call. When lastEvaluatedKey is non-null there are more pages; pass it as ExclusiveStartKey in a follow-up call (currently requires a custom HTTP block) or use a Loop block to iterate.
  • Batch Write limits — DynamoDB allows up to 25 put/delete operations per BatchWriteItem call. If unprocessedItems is non-empty, DynamoDB was throttled; use a retry loop and implement exponential back-off before resubmitting those items.
  • IAM permissions — the access key needs dynamodb:GetItem, dynamodb:PutItem, dynamodb:UpdateItem, dynamodb:DeleteItem, dynamodb:Query, dynamodb:Scan, and dynamodb:BatchWriteItem on the target table ARN (e.g., arn:aws:dynamodb:us-east-1:123456789012:table/MyTable).