Dynamically process data with a Map state

This workflow demonstrates dynamic parallelism using a Map state.

In this pattern, Step Functions uses an AWS Lambda function to pull messages off an Amazon SQS queue, and passes a JSON array of those message to a Map state.
For each message in the queue, the state machine writes the message to DynamoDB, invokes the other Lambda function to remove the message from Amazon SQS, and then publishes the message to the Amazon SNS topic.

< Back to all workflows

GitHub icon View this workflow on GitHub


Clone repo

git clone https://github.com/aws-samples/step-functions-workflows-collection/tree/main/dynamically-process-data-with-map-state/cd step-functions-workflows-collection/dynamically-process-data-with-map-state

Deploy

sam deploy --guided


Testing

See the GitHub repo for detailed testing instructions.

Cleanup

1. Delete the stack: sam delete.

Additional resources

Created by:

Zainab Allawi

Zainab Allawi

Zainab Allawi is a Solutions Architect at Amazon Web Services (AWS) based in Bahrain. She enjoys collaborating with customers to build automated solutions in AWS to solve every-day challenges.

Follow on LinkedIn