0
0
AWScloud~30 mins

Step Functions for workflows in AWS - Mini Project: Build & Apply

Choose your learning style9 modes available
Step Functions for workflows
📖 Scenario: You are building a simple workflow to automate a package delivery process using AWS Step Functions. The workflow will have steps to check package availability, process payment, and confirm shipment.
🎯 Goal: Create an AWS Step Functions state machine definition in JSON that models the package delivery workflow with three states: CheckAvailability, ProcessPayment, and ConfirmShipment. The workflow should proceed from checking availability to payment processing, then to shipment confirmation, and finally end successfully.
📋 What You'll Learn
Define a state machine with three states named exactly: CheckAvailability, ProcessPayment, and ConfirmShipment.
Each state should be a Task state with a placeholder resource ARN.
The workflow should start at CheckAvailability.
The states should transition in order: CheckAvailability -> ProcessPayment -> ConfirmShipment.
The ConfirmShipment state should be a terminal state with End set to true.
💡 Why This Matters
🌍 Real World
Step Functions help automate complex workflows by connecting multiple AWS services in a reliable sequence.
💼 Career
Understanding Step Functions is essential for cloud engineers and developers building scalable, serverless applications.
Progress0 / 4 steps
1
Create the initial state machine structure
Create a JSON object called stateMachine with a StartAt property set to CheckAvailability and an empty States object.
AWS
Need a hint?

Start by defining the StartAt property and an empty States object inside your JSON.

2
Add the CheckAvailability state
Inside the States object, add a state named CheckAvailability with Type set to Task, a placeholder Resource ARN string "arn:aws:lambda:region:account-id:function:CheckAvailability", and Next set to ProcessPayment.
AWS
Need a hint?

Remember to use the exact state name and set Next to ProcessPayment.

3
Add the ProcessPayment state
Add a state named ProcessPayment inside States with Type set to Task, Resource ARN "arn:aws:lambda:region:account-id:function:ProcessPayment", and Next set to ConfirmShipment.
AWS
Need a hint?

Use the exact state name and set Next to ConfirmShipment.

4
Add the terminal ConfirmShipment state
Add a state named ConfirmShipment inside States with Type set to Task, Resource ARN "arn:aws:lambda:region:account-id:function:ConfirmShipment", and End set to true to mark the workflow completion.
AWS
Need a hint?

Set End to true to mark this as the final state.