This is an experimental example. It may not build out of the box
This example uses AWS Lambda Durable Functions (re:Invent 2025 launch) which requires
nodejs24.xruntime and the@aws/durable-execution-sdk-jsSDK.
This example demonstrates AWS Lambda Durable Functions integrated with Amazon Bedrock to build a multi-step AI content generation workflow with automatic checkpointing.
The Lambda function uses durable execution to:
- Generate a blog outline using Bedrock (Claude)
- Wait 5 seconds (simulating editorial review)
- Expand the outline into a draft
- Generate a summary
Each step is automatically checkpointed — if the function fails mid-execution, it resumes from the last completed step rather than restarting.
User → Lambda (Durable) → Step 1: Bedrock (outline)
→ Wait (5s)
→ Step 2: Bedrock (draft)
→ Step 3: Bedrock (summary)
→ Return result
npm install
npm run buildnpx cdk deployaws lambda invoke \
--function-name <FunctionName> \
--qualifier <VersionNumber> \
--payload '{"topic":"AWS Lambda Durable Functions"}' \
output.json && cat output.jsonnpx cdk destroy