AWS Step Functions is a powerful orchestration service that can be integrated with many other Amazon services, including Amazon Simple Queue Service (SQS). SQS is a message queuing service that can store messages, during which a consumer can receive the message from the queue. Using Step Functions, you can create state machines that can dynamically process data, including messages in an SQS queue, using its Map state.
In this Cloud Lab, you’ll create a state machine to detect the sentiment of each message stored in an SQS queue. First, you’ll set up an EC2 instance to run an application where feedback about a book can be submitted. The feedback will be sent as messages in the queue using a REST API. The state machine will dynamically process this feedback and email the detected sentiment to the user via an SNS topic.
By the end of this Cloud Lab, you’ll have a thorough understanding of Step Functions’ dynamic parallelism and be equipped to process multiple SQS messages using a state machine. The following is the high-level architecture diagram of the infrastructure that you’ll create in this Cloud Lab: