aws_dynamodb
Execute AWS DynamoDB operations.
Overview
Execute AWS DynamoDB operations.
Supports operations: - put_item: Insert or replace an item - get_item: Retrieve an item by key - query: Query items using key conditions - scan: Scan table (expensive operation) - update_item: Update specific attributes - delete_item: Delete an item - batch_write: Write multiple items
Setup: 1. Create an AWS account at https://aws.amazon.com/ 2. Create a DynamoDB table in the AWS Console (https://console.aws.amazon.com/dynamodb/) 3. Create an IAM user with DynamoDB permissions (or use an existing user) 4. Generate AWS access keys (Access Key ID and Secret Access Key) for programmatic access 5. Store your credentials securely (e.g., environment variables: AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY)
Required AWS Permissions: dynamodb:PutItem, dynamodb:GetItem, dynamodb:Query, dynamodb:Scan, dynamodb:UpdateItem, dynamodb:DeleteItem, dynamodb:BatchWriteItem
Examples
Put item
Insert or replace an item in DynamoDB
type: aws_dynamodb
aws_access_key_id: ${env:AWS_ACCESS_KEY_ID}
aws_secret_access_key: ${env:AWS_SECRET_ACCESS_KEY}
region: us-east-1
operation: put_item
table_name: users
item:
user_id: ${user.id}
email: ${user.email}
created_at: ${timestamp}
output_to: put_result
Get item
Retrieve an item by primary key
type: aws_dynamodb
region: us-east-1
operation: get_item
table_name: users
key:
user_id: ${user_id}
output_to: user_data
Query items
Query items with condition
type: aws_dynamodb
region: us-east-1
operation: query
table_name: orders
key_condition_expression: "user_id = :uid"
expression_attribute_values:
":uid": ${user_id}
limit: 10
output_to: user_orders
Update item
Update specific attributes
type: aws_dynamodb
region: us-east-1
operation: update_item
table_name: users
key:
user_id: ${user_id}
update_expression: "SET email = :email, updated_at = :time"
expression_attribute_values:
":email": ${new_email}
":time": ${timestamp}
output_to: update_result
Configuration
| Parameter | Type | Required | Description |
|---|---|---|---|
aws_access_key_id | string | No | AWS access key ID for authentication. If not provided, uses default boto3 credentials. |
aws_secret_access_key | string | No | AWS secret access key for authentication. If not provided, uses default boto3 credentials. |
region | string | No | AWS region where the DynamoDB table is located.
Default: "us-east-1" |
operation | string | No | DynamoDB operation to perform.
Default: "put_item"
Options: put_item, get_item, query, scan, update_item, delete_item, batch_write |
table_name | string | Yes | Name of the DynamoDB table. |
item | string | No | Item to insert (for put_item operation). |
key | string | No | Primary key of the item (for get_item, update_item, delete_item operations). |
items | string | No | List of items to write (for batch_write operation). |
index_name | string | No | Name of the secondary index to query (optional for query operation). |
key_condition_expression | string | No | Key condition expression for query operation (e.g., 'user_id = :uid'). |
filter_expression | string | No | Filter expression to apply after query/scan. |
expression_attribute_values | string | No | Values for expression placeholders (e.g., {':uid': 'user123'}). |
expression_attribute_names | string | No | Attribute name placeholders for reserved keywords. |
update_expression | string | No | Update expression for update_item operation (e.g., 'SET email = :email'). |
limit | string | No | Maximum number of items to return from query/scan. |
timeout | integer | No | Request timeout in seconds.
Default: 30 |
output_to | string | No | Path in the event where results will be stored.
Default: "dynamodb" |
Base Configuration
These configuration options are available on all steps:
| Parameter | Type | Default | Description |
|---|---|---|---|
name | | null | Optional name for this step (for documentation and debugging) |
description | | null | Optional description of what this step does |
retries | integer | 0 | Number of retry attempts (0-10) |
backoff_seconds | number | 0 | Backoff (seconds) applied between retry attempts |
retry_propagate | boolean | false | If True, raise last exception after exhausting retries; otherwise swallow. |