Choose the owner of control flow
How code-defined Lambda durable execution differs from Step Functions state-machine orchestration, and which workflow requirements favor each. · advanced
Lambda durable execution puts workflow control flow in a function's application code. Native branches and loops, combined with durable SDK operations, define the logical execution. Checkpoints and replay preserve progress across invocations; the workflow does not require one continuously running invocation.
Step Functions puts control flow in an explicit state machine defined in Amazon States Language. The orchestration service evaluates transitions and coordinates tasks. A Lambda function used as a task owns its computation, not the surrounding workflow's next-state decision.
The distinction is application program versus state machine, not code versus a visual editor: state-machine definitions can also be generated from code. Both models support multi-step work, branches, and waits. For long-running Step Functions orchestration, consider Standard Workflows rather than treating Express as an interchangeable execution model.
| Boundary | Lambda durable execution | Step Functions |
|---|---|---|
| Workflow definition | Function code and durable SDK | Explicit state machine |
| Control-flow owner | Application program | Orchestration service |
| Progress representation | Durable operation checkpoints | Execution states and transitions |
| Business work | Operations called from code | Workers or service integrations |