What is AWS Step Functions and when would you use it?
Answer
AWS Step Functions is a serverless orchestration service that lets you coordinate multiple AWS services (Lambda, DynamoDB, SQS, ECS) into visual workflows called state machines. State machines are defined in Amazon States Language (ASL) — a JSON-based definition of states (tasks, choices, parallel, wait, etc.) and transitions. When to use: (1) Multi-step business processes — order fulfillment (validate → charge → fulfill → notify); (2) Long-running workflows — processes exceeding Lambda's 15-minute limit; Step Functions can wait for callbacks (days/months); (3) Error handling and retries — built-in retry policies with exponential backoff per step; (4) Parallel processing — Fan-out to parallel branches, wait for all to complete; (5) Human approval workflows — pause and wait for an external signal (email approval); (6) Complex conditionals — Choice states with multiple branches. Step Functions replaces custom orchestration code with visual, auditable workflows. Standard Workflows bill per state transition ($0.025/1000); Express Workflows bill per execution duration.
Previous
How do you reduce cold start latency in serverless functions?
Next
How do you handle state in serverless applications?
More Serverless Architecture Questions
View all →- Intermediate How do you reduce cold start latency in serverless functions?
- Intermediate How do you handle state in serverless applications?
- Intermediate What is the Serverless Framework and how does it work?
- Intermediate How do you implement authentication in a serverless API?
- Intermediate What is Lambda@Edge and what are its use cases?