Get Hands-on with Amazon EKS - Workshop Event Series
Whether you're taking your first steps with Kubernetes or you're an experienced practitioner looking to sharpen your skills, our Amazon EKS workshop series delivers practical, real-world experience that moves you forward. Learn directly from AWS solutions architects and EKS specialists through hands-on sessions designed to build your confidence with Kubernetes. Register now and start building with Amazon EKS!
re:Invent 2025 - Deep Dive on AWS Lambda durable functions
AWS introduced Lambda durable functions, enabling developers to build reliable, long-running applications using familiar programming languages while maintaining the simplicity of writing code like a monolith and deploying as microservices. The feature supports executions up to one year with automatic checkpointing and replay capabilities.
At AWS re:Invent 2025, Eric Johnson, Principal Developer Advocate for AWS, and Michael Gasch, Senior Product Manager for the Serverless organization, unveiled AWS Lambda durable functions, a capability that addresses a fundamental challenge in serverless development. Developers want the simplicity of building monolithic applications on a single screen but need the benefits of microservices deployment without cognitive overload.
From serverless evolution to durable execution
The serverless journey began with AWS Lambda in 2014, followed by AWS Step Functions in 2016 for workflow orchestration and Amazon EventBridge in 2019 for event-driven choreography. These services handled orchestration across AWS services and event routing between domains, but developers continued asking for better ways to orchestrate application logic itself.
Lambda durable functions solves this by allowing developers to write reliable business logic as sequential steps using JavaScript, Python, or TypeScript. Functions can suspend execution for extended durations while waiting for human approvals, payment confirmations, or external events, and resume automatically when conditions are met. Because durable functions are standard Lambda functions with enhanced capabilities, developers use their existing tools, IDEs, and workflows without learning new paradigms.
How it works: checkpoints and replay
Durable functions rest on two core concepts. Checkpoints act as save points in your code, persisting progress at specific moments. When a function encounters a failure or needs to suspend, it resumes from the most recent checkpoint rather than starting over. Replay runs the event handler from beginning to end but intelligently skips completed checkpoints, avoiding redundant work and unwanted side effects.
A new open-source SDK abstracts these primitives into higher-level operations. Wrap code blocks in steps to checkpoint work automatically. Use waits to suspend execution until timers expire, callbacks are invoked, or external conditions are met. The SDK includes automatic retry logic with configurable backoff, removing significant boilerplate. Functions gain built-in idempotency, ensuring only one execution runs for a given request even if upstream systems retry.
Minimal configuration, maximum impact
Enabling durable execution requires toggling a single switch in the Lambda console. Through AWS SAM, AWS CloudFormation, or the AWS Cloud Development Kit, two properties configure the capability: execution timeout (up to one year) and retention period for checkpoint data.
In function code, import the SDK and wrap your event handler with withDurableExecution. This provides access to DurableContext, which exposes checkpoint and wait primitives. Existing code remains unchanged, in other words, only enhanced capabilities are added.
Johnson demonstrated this through a live demo of Serverlesspresso, a coffee ordering application he rebuilt using durable functions. The demo showed parallel execution for validation, callback-based waits for barista acceptance, and compensation logic (the Saga pattern) for handling cancellations. He built the entire application in approximately six hours using Amazon Q Developer, demonstrating how well AI coding assistants understand the sequential programming model.
Local development and observability
The local development experience stands out as particularly compelling. Using SAM CLI, developers invoke durable functions locally, interact with callbacks during execution, retrieve execution state, and access full history, all without deploying to AWS. The SDK includes a testing kit for unit testing with mocked dependencies.
The Lambda console includes a new Durable Executions tab showing all running, completed, and failed executions. Each execution displays its current state, completed checkpoints, and input/output for each step. AWS X-Ray supports tracing, and EventBridge emits execution status change events, allowing systems to react to completions or failures without polling.
Production ready with key integrations
At launch, durable functions support Node.js 20, 22, and 24 runtimes plus Python 3.13 and 3.14, with additional languages planned. All Lambda event sources integrate with durable functions. Synchronous invocations are limited to 15 minutes execution duration, while asynchronous invocations support the full one-year timeout.
The capability works with Lambda features including concurrency controls, dead-letter queues, layers, Lambda SnapStart, and AWS Lambda Powertools. Security controls include new IAM conditions and managed policies for gradual adoption.
A important consideration involves code determinism. Because functions replay from checkpoints, any non-deterministic code like UUID generation or timestamps must be wrapped in steps. The SDK provides deterministic versions of common concurrency primitives to ensure correct replay behavior.
Pricing and choosing the right tool
Pricing introduces three dimensions: operations (checkpoints, steps, waits) at $8.00 per million operations, data written within checkpoints, and data retained after execution. Standard Lambda compute charges apply when functions execute.
Regarding Step Functions versus durable functions, Johnson was direct: both services are excellent and AWS invests in both. Step Functions excels at workflow orchestration across AWS services with visual builders. Durable functions shines for application code orchestration using familiar programming languages and local development workflows. For many scenarios, either works, the choice depends on team preferences and requirements.
Key takeaways
Lambda durable functions enables building like a monolith while deploying as microservices. Applications gain automatic retries, checkpointing, idempotency, and long-running execution support without complex custom code. Developers focus on business logic using familiar languages rather than learning new orchestration paradigms.
For teams building order processing, payment workflows, user onboarding, or any application requiring reliable multi-step processes with human-in-the-loop approvals or long-running operations, Lambda durable functions provides a compelling path forward. The open-source SDK welcomes community contributions through GitHub.
Full session recording is available on: AWS re:Invent 2025 - [NEW LAUNCH] Deep Dive on AWS Lambda durable functions (CNS380)
- Topics
- ServerlessCompute
- Language
- English
Relevant content
- Accepted Answerasked a day ago
- asked 16 days ago
AWS OFFICIALUpdated 4 years ago
AWS OFFICIALUpdated 4 months ago