Select your cookie preferences

We use cookies and similar tools to enhance your experience, provide our services, deliver relevant advertising, and make improvements. Approved third parties also use these tools to help us deliver advertising and provide certain site features.

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.

GitHub icon Visit the GitHub repo for this workflow.

< Back to workflows

Download

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

Zainab Allawi

Presented by 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