AWS Step Functions is a powerful orchestration service that can be integrated with many other AWS services, such as Amazon SQS, SNS, and DynamoDB. You’ll learn how Step Functions supports JSONata, a powerful query and transformation language for JSON data, and how variables can efficiently handle data. JSONata enables advanced transformations, such as date formatting and mathematical operations, reducing the need for additional processing.
In this Cloud Lab, you’ll create an SQS queue, an SNS topic, and a DynamoDB table to store the inventory. Then, you will build a state machine in Step Functions to process orders received in the SQS queue. The state machine will extract order details from the message and insert them into the DynamoDB table. It will then check if the requested item weight is currently available in stock. A notification will be sent if the item is in stock; otherwise, it will be marked as pending. If more than two orders are pending, a notification will be sent to you requesting you to restock the item.
By the end of this Cloud Lab, you’ll understand how to create variables and transform data using JSONata in AWS Step Functions. The following is the high-level architecture diagram of the infrastructure that you’ll create in this Cloud Lab: