I'm really excited about the removal of the 15-minute execution limit with the new Lambda Durable Execution feature. However, I'm confused about how to manage the state between steps. Does this replace the need for AWS Step Functions for simple sequential tasks, or is it better suited for something else? I want to avoid the "spaghetti code" that often comes with complex serverless logic.
3 answers
Durable Execution is a huge win, but it doesn't completely replace Step Functions. Think of Durable Execution as "internal" state management for a single function that needs to wait for external events or handle long-running IO without timing out. Step Functions is still superior for high-level orchestration, visual debugging, and error handling across multiple different AWS services. I recommend using Durable Execution when you have a single logic flow that might take an hour to finish—like a heavy data export—but keep using Step Functions if you need to coordinate between Lambda, SQS, and SageMaker.
Are you finding that the pricing for Durable Execution is more competitive for your use case than the standard "state transition" costs you'd pay with Step Functions?
Just be careful with the local variable persistence. You still need to make sure your code is idempotent because the function can still restart if there's an underlying hardware failure.
Solid advice, Patricia. Idempotency is still the golden rule of serverless, regardless of how long the execution window is allowed to stay open.
That's exactly why I'm looking at it! Our Step Functions bill is huge because we have thousands of small state transitions. If I can consolidate those into a single "Durable" Lambda, I think I can cut our serverless costs by 30%. I’m just worried about the debugging experience since I won't have that nice visual graph that Step Functions provides to see where a process failed.