AWS Step Functions to Amazon DynamoDB

Step Functions → Amazon DynamoDB

Create an AWS Step Functionsworkflow to integrate with Amazon DynamoDB

The SAM template deploys a Step Functions workflow, that takes in a payload and puts the item in DynamoBb. Additionally, this workflow also shows how to read an item directly from the DynamoDB table. The SAM template contains the minimum IAM resources required to run the application.

< Back to all patterns

GitHub icon Download this pattern (.zip)

GitHub icon View this pattern on GitHub


Clone repo

git clone https://github.com/aws-samples/serverless-patterns/cd serverless-patterns/sfn-dynamodb

Deploy

sam deploy --guided


Testing

Run the following AWS CLI command to send a 'start-execution` command to start the Step Functions workflow. Note, you must edit the {StateMachineExpressSynctoLambda} placeholder with the ARN of the deployed Step Functions workflow: aws stepfunctions start-execution --name "test" --state-machine-arn "{StateMachinetoDDBArn}" --input "{\"id\": \"12345\" }"

Cleanup

Delete the stack aws cloudformation delete-stack --stack-name STACK_NAME

Additional resources

Created by:

Revanth Anireddy

Revanth Anireddy

Senior Cloud Applications Architect @ AWS.