Skip to main content

AWS DynamoDB

Add Query​

You can add a query step by adding a workflow from the page list.
When you select the AWS DynamoDB data source from the workflow step sidebar, the query input window appears.

aws-dynamodb

Actions​

Query​

Use the partition key and sort key to query the table or secondary index.

query

Parameters​

NameTypeDescription
TableName (tableName)stringTable name to query
KeyConditionExpression (keyConditionExpression)stringCondition expression to query
ProjectionExpression (projectionExpression)stringProjection expression
FilterExpression (filterExpression)stringFilter expression
ExpressionAttributeValues (expressionAttributeValues)stringAttribute name to query
Other Settings (otherParameters)stringOther settings

Query Result​

When you run the Query action, the result is returned in the following structure. For more information, see the AWS DynamoDB official documentation.

interface Result {
consumedCapacity: Record<string, unknown>;
count: number;
items: Record<string, unknown>[];
lastEvaluatedKey: Record<string, unknown>;
scannedCount: number;
}

Use Result​

To use the result in another step, write as follows.

return outputs.stepName.items;

DeleteItem​

Delete a specific item from the table.

delete-item

Parameters​

NameTypeDescription
TableName (tableName)stringTable name to delete
Key (key)stringKey value to delete
ConditionExpression (conditionExpression)stringCondition expression
ExpressionAttributeValues (expressionAttributeValues)stringAttribute name to delete
Other Settings (otherParameters)stringOther settings

Query Result​

When you run the DeleteItem action, the result is returned in the following structure. For more information, see the AWS DynamoDB official documentation.

interface Result {
attributes: Record<string, unknown>;
consumedCapacity: Record<string, unknown>;
itemCollectionMetrics: Record<string, unknown>;
}

Use Result​

To use the result in another step, write as follows.

return outputs.stepName.attributes;

PutItem​

Add a new item to the table.

put-item

Parameters​

NameTypeDescription
TableName (tableName)stringTable name to add
Item (item)stringItem value to add
ConditionExpression (conditionExpression)stringCondition expression
ExpressionAttributeValues (expressionAttributeValues)stringAttribute name to add
Other Settings (otherParameters)stringOther settings

Query Result​

When you run the PutItem action, the result is returned in the following structure. For more information, see the AWS DynamoDB official documentation.

interface Result {
attributes: Record<string, unknown>;
consumedCapacity: Record<string, unknown>;
itemCollectionMetrics: Record<string, unknown>;
}

Use Result​

To use the result in another step, write as follows.

return outputs.stepName.attributes;

UpdateItem​

Modify the properties of an existing item.

update-item

Parameters​

NameTypeDescription
TableName (tableName)stringTable name to update
Key (key)stringKey value to update
UpdateExpression (updateExpression)stringUpdate expression
ConditionExpression (conditionExpression)stringCondition expression
ExpressionAttributeValues (expressionAttributeValues)stringAttribute name to update
Other Settings (otherParameters)stringOther settings

Query Result​

When you run the UpdateItem action, the result is returned in the following structure. For more information, see the AWS DynamoDB official documentation.

interface Result {
attributes: Record<string, unknown>;
consumedCapacity: Record<string, unknown>;
itemCollectionMetrics: Record<string, unknown>;
}

Use Result​

To use the result in another step, write as follows.

return outputs.stepName.attributes;