Search all guides

Reference · Tools

AWS DynamoDB integration

Put, get, scan or query, and delete items in Amazon DynamoDB tables, with condition, projection and filter expressions and secondary-index queries.

Action Data & Storage v1

The AWS DynamoDB node lets you create, read, update, and delete items in any DynamoDB table directly from a workflow. You can query a secondary index with filter expressions to power a serverless product catalog lookup, or scan a table with pagination to process large datasets in batches. It handles DynamoDB's attribute type marshalling automatically, so you work with plain JavaScript values rather than the raw `{S: ...}` / `{N: ...}` format.

Works as
Action
Tool name
aws_dynamodb
Operations
4 — Create or Update , Delete , Get , Get Many
Parameters
25
Outputs
Output, Error
Credentials
AWS DynamoDB
Official docs
AWS DynamoDB docs docs.aws.amazon.com

What you can build with AWS DynamoDB

  • Get a user record from DynamoDB by primary key.
  • Create or update an item in a DynamoDB table.
  • Scan all items in a DynamoDB table.
  • Query items using a key condition expression.
  • Delete an item from DynamoDB by partition key and sort key.

Overview

AWS DynamoDB action node for NoSQL key-value and document database operations. Supports create/update (PutItem), get (GetItem), get many (Scan or Query with pagination), and delete (DeleteItem). Uses the AWS SDK v3 DynamoDB Document Client for automatic type marshalling between JavaScript native types and DynamoDB attribute types. Supports condition expressions, projection expressions, filter expressions, expression attribute names/values, secondary index queries, and configurable read consistency.

Node Type

Action — processes input items and produces output

Input / Output

DirectionPort(s)
InputInput
OutputOutput, Error

Credentials

This tool requires AWS DynamoDB credentials. See the Credentials Guide for setup instructions.

Resources

ResourceValue
Itemitem

Operations

OperationValueDescription
Create or UpdateupsertCreate a new item, or replace the current one if it already exists (PutItem)
DeletedeleteDelete an item by primary key
GetgetGet a single item by primary key
Get ManygetAllGet many items via Scan or Query

Parameters

Item: Create or Update

ParameterTypeRequiredDefaultDescription
Table NamestringYes—The DynamoDB table name. You can find table names in the AWS DynamoDB console.
Data to SendoptionsNodefineBelowWhether to auto-map input data or define fields manually.
Options: autoMapInputData (use when node input properties match destination column names), defineBelow (set the value for each destination column)
Inputs to IgnorestringNo—Comma-separated list of input properties to skip. Leave empty to send all properties. (shown when Data to Send is autoMapInputData)
Fields to SendfixedCollectionNo{}(shown when Data to Send is defineBelow)
— Field IDstringNo—The attribute name in DynamoDB.
— Field ValuestringNo—The attribute value.
Additional FieldscollectionNo{}
Options: N, stronglyConsistentRead
— Condition ExpressionstringNo—A condition that must be satisfied for a conditional upsert to succeed. See AWS PutItem API docs.
— Expression Attribute ValuesfixedCollectionNo{}Substitution tokens for attribute names in an expression. Only needed when Condition Expression is set.
— — AttributestringNo—
— — TypeoptionsNoS
Options: N, S
— — ValuestringNo—
— Expression Attribute NamesfixedCollectionNo{}Substitution tokens for attribute names in an expression.
— — KeystringNo—
— — ValuestringNo—

Item: Delete

ParameterTypeRequiredDefaultDescription
Table NamestringYes—The DynamoDB table name. You can find table names in the AWS DynamoDB console.
ReturnoptionsNoNONEWhether to return the item attributes as they appeared before deletion.
Options: ALL_OLD (return the content of the old item), NONE (nothing is returned)
KeysfixedCollectionNo{}Item’s primary key. For a simple primary key, provide only the partition key. For a composite key, provide both partition key and sort key.
Options: B
— KeystringNo—
— TypeoptionsNoS
Options: B, N, S
— ValuestringNo—
SimplifybooleanNotrueWhether to return a simplified version of the response instead of the raw data. (shown when Return is ALL_OLD)
Additional FieldscollectionNo{}
Options: N, stronglyConsistentRead
— Condition ExpressionstringNo—A condition that must be satisfied for a conditional delete to succeed.
— Expression Attribute NamesfixedCollectionNo{}Substitution tokens for attribute names in an expression.
— — KeystringNo—
— — ValuestringNo—
— Expression Attribute ValuesfixedCollectionNo{}Substitution tokens for attribute values in an expression. Only needed when Condition Expression is set.
— — AttributestringNo—
— — TypeoptionsNoS
Options: N, S
— — ValuestringNo—

Item: Get

ParameterTypeRequiredDefaultDescription
Table NamestringYes—The DynamoDB table name. You can find table names in the AWS DynamoDB console.
Select (getSelect)optionsNoALL_ATTRIBUTESWhich attributes GetItem returns for the single item. “SPECIFIC_ATTRIBUTES” narrows the read to the Attributes to Select listed under Additional Fields. GetItem has no COUNT mode — to count items use the getAll operation.
Options: ALL_ATTRIBUTES, ALL_PROJECTED_ATTRIBUTES, SPECIFIC_ATTRIBUTES (select them in Attributes to Select under Additional Fields)
SimplifybooleanNotrueWhether to return a simplified version of the response instead of the raw data. (shown when Select is ALL_PROJECTED_ATTRIBUTES, ALL_ATTRIBUTES)
KeysfixedCollectionNo{}Item’s primary key. For a simple primary key, provide only the partition key. For a composite key, provide both partition key and sort key.
Options: B
— KeystringNo—
— TypeoptionsNoS
Options: B, N, S
— ValuestringNo—
Additional FieldscollectionNo{}
Options: N, stronglyConsistentRead
— Attributes to SelectstringNo—Comma-separated list of attributes to retrieve (projection expression).
— Expression Attribute NamesfixedCollectionNo{}Substitution tokens for attribute names in an expression.
— — KeystringNo—
— — ValuestringNo—
— Read TypeoptionsNoeventuallyConsistentReadType of read to perform on the table.
Options: stronglyConsistentRead, eventuallyConsistentRead

Item: Get Many

ParameterTypeRequiredDefaultDescription
Table NamestringYes—The DynamoDB table name. You can find table names in the AWS DynamoDB console.
ScanbooleanNofalseWhether to use Scan (reads all items) or Query (uses key condition). Scan is less efficient but does not require a key condition expression.
Key Condition ExpressionstringYes—Condition to determine items to retrieve. Must perform an equality test on a single partition key value, e.g. “partitionKeyName = :partitionkeyval”. (shown when Scan is false)
Expression Attribute ValuesfixedCollectionNo{}Substitution tokens for attribute values in an expression.
Options: N
— AttributestringNo—
— TypeoptionsNoS
Options: N, S
— ValuestringNo—
Return AllbooleanNofalseWhether to return all results or only up to a given limit.
LimitnumberNo50Max number of results to return. (shown when Return All is false)
Select (select)optionsNoALL_ATTRIBUTESThe DynamoDB Select mode for the Query or Scan behind getAll. “COUNT” returns only Count and ScannedCount — no items, no projection and no limit are applied.
Options: ALL_ATTRIBUTES, ALL_PROJECTED_ATTRIBUTES, COUNT, SPECIFIC_ATTRIBUTES (select them in Attributes to Select under Options)
SimplifybooleanNotrueWhether to return a simplified version of the response instead of the raw data. (shown when Select is ALL_PROJECTED_ATTRIBUTES, ALL_ATTRIBUTES, SPECIFIC_ATTRIBUTES)
OptionscollectionNo{}
— Index NamestringNo—Name of the secondary index to query. Can be any local or global secondary index on the table.
— Attributes to SelectstringNo—Comma-separated list of attributes to retrieve. These can include scalars, sets, or elements of a JSON document.
— Filter ExpressionstringNo—Conditions applied after the Query but before data is returned. Items that do not satisfy this expression are not returned. (shown when /scan is false)
— Expression Attribute NamesfixedCollectionNo{}Substitution tokens for attribute names in an expression.
— — KeystringNo—
— — ValuestringNo—

All Operations

ParameterTypeRequiredDefaultDescription
Filter ExpressionstringNo—A filter expression to apply during Scan. Items that do not satisfy this expression are discarded. Leave empty to return all items. (shown when Scan is true)
Max ConcurrencynumberNo10Maximum number of items to process concurrently.

Output Data

Results are merged onto the input item’s JSON, so the properties you started with remain available alongside the DynamoDB attributes. The Document Client marshals DynamoDB attribute types to native JSON, so values arrive as plain strings, numbers, booleans, lists and maps — not as {"S": "..."} wrappers. Binary data on the input item is forwarded.

OperationOutput
upsertOne item per input item, carrying the attributes that were written.
getOne item per input item, carrying the item’s attributes. A key that matches nothing produces the input item unchanged.
deleteOne item per input item. With Return set to NONE the item carries success: true; with ALL_OLD it carries the attributes as they were immediately before deletion.
getAllFans out — one output item per row returned. A Scan or Query that matches nothing emits one item, which is the input item passed through unchanged.
getAll with Select = COUNTOne item per input item carrying Count and ScannedCount instead of rows.

With Simplify on (the default), attributes with no value are dropped from the result; turn it off to keep the response exactly as DynamoDB returned it.

Reference attributes downstream by name, e.g. {{ $json.userId }} or {{ $json.Count }}.

Example Configuration

Write the incoming item straight into a table, dropping workflow-only properties:

{
  "type": "aws_dynamodb",
  "parameters": {
    "resource": "item",
    "operation": "upsert",
    "tableName": "users",
    "dataToSend": "autoMapInputData",
    "inputsToIgnore": "_error,_metadata"
  }
}

Write named attributes only, and refuse to overwrite an existing row:

{
  "type": "aws_dynamodb",
  "parameters": {
    "resource": "item",
    "operation": "upsert",
    "tableName": "users",
    "dataToSend": "defineBelow",
    "fieldsUi": {
      "fieldValues": [
        { "fieldId": "userId", "fieldValue": "{{ $json.id }}" },
        { "fieldId": "email", "fieldValue": "{{ $json.email }}" },
        { "fieldId": "status", "fieldValue": "active" }
      ]
    },
    "additionalFields": {
      "conditionExpression": "attribute_not_exists(userId)"
    }
  }
}

Read one item by composite key, strongly consistent:

{
  "type": "aws_dynamodb",
  "parameters": {
    "resource": "item",
    "operation": "get",
    "tableName": "orders",
    "select": "ALL_ATTRIBUTES",
    "simple": true,
    "keysUi": {
      "keyValues": [
        { "key": "customerId", "type": "S", "value": "{{ $json.customerId }}" },
        { "key": "orderDate", "type": "S", "value": "{{ $json.orderDate }}" }
      ]
    },
    "additionalFields": {
      "readType": "stronglyConsistentRead",
      "projectionExpression": "customerId, orderDate, total"
    }
  }
}

Query a partition and page through every match:

{
  "type": "aws_dynamodb",
  "parameters": {
    "resource": "item",
    "operation": "getAll",
    "tableName": "orders",
    "scan": false,
    "keyConditionExpression": "customerId = :cid",
    "eavUi": {
      "eavValues": [
        { "attribute": ":cid", "type": "S", "value": "{{ $json.customerId }}" }
      ]
    },
    "returnAll": true,
    "select": "ALL_ATTRIBUTES",
    "simple": true
  }
}

Scan a table with a filter, capped at 50 rows:

{
  "type": "aws_dynamodb",
  "parameters": {
    "resource": "item",
    "operation": "getAll",
    "tableName": "users",
    "scan": true,
    "filterExpression": "#st = :active",
    "eavUi": {
      "eavValues": [
        { "attribute": ":active", "type": "S", "value": "active" }
      ]
    },
    "returnAll": false,
    "limit": 50,
    "select": "ALL_ATTRIBUTES",
    "options": {
      "eanUi": {
        "eanValues": [
          { "key": "#st", "value": "status" }
        ]
      }
    }
  }
}

Query a global secondary index and return only the matching count:

{
  "type": "aws_dynamodb",
  "parameters": {
    "resource": "item",
    "operation": "getAll",
    "tableName": "orders",
    "scan": false,
    "keyConditionExpression": "email = :email",
    "eavUi": {
      "eavValues": [
        { "attribute": ":email", "type": "S", "value": "{{ $json.email }}" }
      ]
    },
    "select": "COUNT",
    "options": {
      "indexName": "email-index"
    }
  }
}

Delete by key and keep a copy of what was removed:

{
  "type": "aws_dynamodb",
  "parameters": {
    "resource": "item",
    "operation": "delete",
    "tableName": "users",
    "keysUi": {
      "keyValues": [
        { "key": "userId", "type": "S", "value": "{{ $json.id }}" }
      ]
    },
    "returnValues": "ALL_OLD",
    "simple": true
  }
}

Error Handling

ModeBehavior
stopHalts workflow on first error
continueSkips failed items, passes successful ones through
errorPortRoutes failed items to Error output port

Tips

AWS DynamoDB puts, gets, scans, queries and deletes items in a DynamoDB table. It is the right tool when a workflow must read or write a NoSQL item by its key, or fetch many items by a key condition or a full scan, in DynamoDB rather than a relational database or a spreadsheet. It returns items as plain JSON with native types unmarshalled, getAll paging through the results, and the written or deleted key for the other operations.

Frequently asked questions

What credential does this node require, and how is it different from a generic AWS credential?

The node uses the AWS DynamoDB credential type (`awsDynamoDbApi`), which is scoped specifically to DynamoDB rather than a broad AWS credential. You'll need an IAM user or role with DynamoDB permissions (e.g. `dynamodb:GetItem`, `dynamodb:PutItem`) and supply the access key, secret, and region through that credential type in BusyBot.

How does the node handle DynamoDB's attribute type format — do I have to write `{S: 'hello'}` myself?

No. The node uses the AWS SDK v3 DynamoDB Document Client, which automatically marshals between JavaScript native types and DynamoDB's internal attribute format. You pass plain strings, numbers, booleans, and objects; the Document Client converts them to and from the `{S: ...}`, `{N: ...}` representation transparently.

What operations are available, and which DynamoDB API calls do they map to?

There are four operations: create/update maps to `PutItem`, get single item maps to `GetItem`, get many items uses `Scan` or `Query` (with pagination support), and delete maps to `DeleteItem`. If you need conditional writes or reads, you can supply condition expressions, filter expressions, and projection expressions through the node's parameters.

The node has two outputs — Output and Error. When does execution go to the Error output instead of failing the workflow?

When DynamoDB returns an error (for example, a `ConditionalCheckFailedException` from a failed condition expression, or a missing table), the node routes that run to the Error output rather than throwing and halting the whole workflow. This lets you branch on failure — for instance, catching a condition check failure to handle an already-existing record differently.

Can I query a DynamoDB Global Secondary Index (GSI) instead of the primary key?

Yes. When using the get-many operation in Query mode, the node supports secondary index queries. You specify the index name alongside your key condition expressions and, optionally, filter expressions and expression attribute names/values to narrow results further.

Build with AWS DynamoDB

Drop it into a workflow, wire it to an agent, or call it on a schedule. You'll need AWS DynamoDB credentials first.

Open BusyBot

Last reviewed . Spotted something wrong? Tell us.