
Checkpointed model turns and tool calls
Each model turn and each tool call runs in context.step(), so after an interruption the agent resumes at the first unfinished step without calling the model again.
Recovering from transient failures
A retry strategy on StepConfig retries a failed tool step with backoff, instead of failing the whole agent.
Workshop
Serverlesspresso is an event-driven coffee-ordering application. The workshop builds it with AWS Lambda durable functions.
Suspend until the attendee decides
The request_approval tool uses context.wait_for_callback(). The agent suspends with no Lambda running until the approve or reject decision arrives.
Reserve the swag
The reserve_swags tool submits reservations to an asynchronous service, then uses context.wait_for_condition() to poll until every reservation is confirmed. The function suspends between polls.
GitHub repo
The Expo Booth Scout agent, its web UI and the AWS SAM template, ready to deploy in your own account.
Workshops and more serverless
Hands-on workshops, the new Lambda form factors, and more serverless content.
AWS Lambda durable functions
The mental 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.