API314: A closer look at AWS Lambda durable functions

Resources for API314: A closer look at AWS Lambda durable functions

AWS Lambda durable functions let you write reliable, long-running workflows as sequential code. This session started with how durable execution works: checkpointing, replay-based recovery, and the programming model. Next, we explored production patterns including sagas, fan-out/fan-in, and human-in-the-loop waits. Finally, we covered observability, a decision framework for choosing between durable functions and AWS Step Functions, and operational considerations like concurrency, cost, and versioning.

This page has the slides, the demo code, and further reading for each part of the session.

How durable execution works

Checkpointing, replay, and the programming model

Durable functions checkpoint each operation and replay your code after an interruption, so completed work is not run again and waits cost no compute. Because the code replays, it has to be deterministic.

Sagas

Compensating for failed steps

There is no distributed transaction across services. A saga runs each step in turn and, when one fails, runs compensating steps to undo the work already done.

Human-in-the-loop waits

Durable Serverlesspresso

Serverlesspresso rebuilt as a durable function. The order workflow pauses with waitForCallback() while it waits for the barista to accept and complete each order, then resumes where it left off.

Fan-out/fan-in

Image analysis orchestration

A four-step durable pipeline that splits an image into a grid of regions and uses context.map to run concurrent Amazon Bedrock Nova inferences across them, then aggregates the findings.

Observability

Metrics, events, logs, and tracing

Durable executions publish Amazon CloudWatch metrics and Amazon EventBridge status change events, and support AWS X-Ray tracing. Structured logs with execution IDs and step names tie it together.

Durable functions or Step Functions

A decision framework

Both run long-running, reliable workflows. The choice comes down to whether you want to express the workflow as code or as a visual, service-integrated state machine, and the two can work together.

Operational considerations

Concurrency, cost, and versioning

Invoke durable functions with a version or alias to pin each execution to the code it started with, and don't rename or change steps in ways that break replay of executions in progress.

Deep dive on AWS Lambda durable functions

re:Invent 2025, CNS380

The launch session for durable functions, including a walkthrough of Durable Serverlesspresso.

Keep learning

Workshops and more serverless

Hands-on workshops, the new Lambda form factors, and tools for building on AWS with a coding agent.

Presented by:

Eric Johnson

Eric Johnson

Eric Johnson is a Principal Developer Advocate for Serverless Applications at Amazon Web Services and is based in Northern Colorado. Eric is a fanatic about serverless and enjoys helping developers understand how serverless technologies introduces a major paradigm shift in how they approach building and running applications at massive scale with minimal administration overhead. Prior to this, Eric has worked as a developer, solutions architect and AWS Evangelist for an AWS partner company.