ExitAWS Lambda vs AWS Step Functions: durable workflow boundaries1 / 7
Explanation

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.

BoundaryLambda durable executionStep Functions
Workflow definitionFunction code and durable SDKExplicit state machine
Control-flow ownerApplication programOrchestration service
Progress representationDurable operation checkpointsExecution states and transitions
Business workOperations called from codeWorkers or service integrations