AWS Step Functions
A flowchart that runs: it chains steps, retries failures and remembers where it was.
AWS Step Functions orchestrates processes that have many steps. You describe a state machine: step A, then B; if B fails retry it three times; then C and D in parallel; wait 24 hours; then E. Each step calls something, most often an AWS Lambda function, but also Amazon ECS tasks, Amazon SQS, Amazon DynamoDB and most AWS APIs. Step Functions runs the flow, tracks exactly where every execution is, and shows it as a live diagram.
The problem it solves: once a process has several steps, someone has to answer 'what if step 3 fails after step 2 already charged the card?'. Writing that logic inside one big function is fragile, and a crashed process forgets everything. A state machine keeps its state outside your code, so an execution can pause for days and pick up again, and a failure in one step triggers the retry or the compensation you defined.
Example: a loan application. Validate the form (Lambda), run a credit check (an external API with a 2-minute timeout and retries), then in parallel calculate the offer and generate the PDF. Then wait for the applicant to sign, up to 7 days, paused at no cost. Then open the account. If any step fails for good, a notification goes out through Amazon SNS.
Definitions are written in a JSON dialect called Amazon States Language, or drawn in the visual Workflow Studio. Standard workflows can run for up to a year; Express workflows are for short, high-volume flows that finish in under five minutes.
Keep in mind
- A state machine defines sequence, choices, parallel branches, waits and retries.
- State lives in the service, not in your code: an execution can pause for days and survive crashes.
- Every execution is visible as a diagram with the input and output of each step.
- Standard workflows for long processes, Express for fast, high-volume ones.