New260+ blocks and 240+ tools are now fully documented
DocumentationReferenceCore BlocksDatabases
Block

Amazon DynamoDB Block

Read, write, and query data in Amazon DynamoDB

The Amazon DynamoDB block integrates AWS DynamoDB into your workflows. Use it to get, put, update, and delete items, run key-based queries and full-table scans, and perform batch writes — all from a single configurable block.

Overview

PropertyValue
Typedynamodb
Categorytools
Color#4D27A8

When to Use

  • Look up a single item by its primary key during a workflow run
  • Persist workflow results by putting or updating items in a table
  • Delete items as part of cleanup or state-management logic
  • Query a table by partition/sort key using a key condition expression
  • Scan a table with an optional filter to find matching records
  • Write or remove many items at once with a batch write operation

Configuration

Operation

Required dropdown. Selects which DynamoDB action to run. The chosen operation determines which additional fields are shown.

LabelID
Get Itemdynamodb_get_item
Put Itemdynamodb_put_item
Update Itemdynamodb_update_item
Delete Itemdynamodb_delete_item
Querydynamodb_query
Scandynamodb_scan
Batch Writedynamodb_batch_write

AWS Region

Required. The AWS region your table lives in (e.g. us-east-1).

Access Key ID

Required. Your AWS access key ID, stored as a secret (password field).

Secret Access Key

Required. Your AWS secret access key, stored as a secret (password field).

Table Name

Required. The name of the DynamoDB table to operate on.

Primary Key (JSON) — key

A JSON object containing the item's primary (and optional sort) key, e.g. {"pk": "value", "sk": "sort_value"}. Shown when the operation is Get Item, Update Item, or Delete Item.

Item (JSON) — item

A JSON object representing the full item to write, e.g. {"pk": "value", "sk": "sort", "data": "content"}. Shown when the operation is Put Item.

Key Condition — keyConditionExpression

A DynamoDB key condition expression string (e.g. pk = :pk). Required when the operation is Query.

Filter Expression — filterExpression

An optional filter expression applied after the read, e.g. attribute = :val. Shown when the operation is Scan or Query.

Inputs & Outputs

Inputs (all subBlock ids map directly to the inputs map):

  • operation (string) — Operation to perform (one of the operation IDs above)
  • awsRegion (string) — AWS region
  • awsAccessKeyId (string) — AWS access key ID
  • awsSecretAccessKey (string) — AWS secret access key
  • tableName (string) — Table name
  • key (json) — Primary key (used by Get Item, Update Item, Delete Item)
  • item (json) — Item data (used by Put Item)
  • keyConditionExpression (string) — Key condition expression (used by Query)
  • filterExpression (string) — Filter expression (used by Query and Scan)

Outputs (available on the block's result):

  • item (json) — Retrieved item (Get Item)
  • items (json) — Array of results from Query or Scan
  • count (number) — Number of items returned by Query or Scan

Tools

Each operation resolves to a dedicated tool registered in tools/registry.ts:

  • DynamoDB Get Item (dynamodb_get_item) — Fetches a single item by its primary key. Returns item.
  • DynamoDB Put Item (dynamodb_put_item) — Inserts or replaces an item. Returns success (boolean).
  • DynamoDB Update Item (dynamodb_update_item) — Updates attributes of an existing item using an update expression and expression attribute values. Returns attributes (the updated item attributes).
  • DynamoDB Delete Item (dynamodb_delete_item) — Deletes an item by its primary key. Returns success (boolean).
  • DynamoDB Query (dynamodb_query) — Queries a table using a key condition expression, with optional filter, index name, and limit. Returns items, count, and lastEvaluatedKey (for pagination).
  • DynamoDB Scan (dynamodb_scan) — Scans all items in a table with an optional filter expression and limit. Returns items, count, and lastEvaluatedKey.
  • DynamoDB Batch Write (dynamodb_batch_write) — Executes multiple put and delete requests in a single call. Accepts requestItems as a JSON map of table → array of PutRequest/DeleteRequest. Returns unprocessedItems (empty if all succeeded).

YAML Example

dynamodb_1:
  type: dynamodb
  name: "Amazon DynamoDB"
  inputs:
    operation: "dynamodb_get_item"
    awsRegion: "us-east-1"
    awsAccessKeyId: "{{AWS_ACCESS_KEY_ID}}"
    awsSecretAccessKey: "{{AWS_SECRET_ACCESS_KEY}}"
    tableName: "MyTable"
    key: '{"pk": "{{start.input}}"}'
  connections:
    outgoing:
      - target: next-block-id