Amazon EventBridge Scheduler to AWS Lambda durable function

Amazon EventBridge Scheduler → AWS Lambda durable function

Create a Lambda durable function triggered by EventBridge Scheduler on a cron schedule using AWS SAM.

This sample project demonstrates how to create a Lambda durable function that is triggered by EventBridge Scheduler on a cron schedule. The Lambda function uses the AWS durable Execution SDK to implement a multi-step workflow with automatic checkpointing and replay capabilities.
The durable execution pattern allows Lambda functions to span multiple invocations while maintaining state. When the function calls context.wait(), it suspends execution and creates a checkpoint. A subsequent invocation resumes from the checkpoint without re-executing previous steps.
This pattern deploys a Lambda durable function with Python 3.14 runtime, an EventBridge Scheduler schedule with cron expression, and uses function versioning to ensure the cron trigger targets a published version rather than $LATEST. EventBridge Scheduler uses an IAM role-based invocation model instead of resource-based permissions.

< Back to all patterns

GitHub icon Download this pattern (.zip)

GitHub icon View this pattern on GitHub


Clone repo

git clone https://github.com/aws-samples/serverless-patterns/cd serverless-patterns/lambda-durable-eventbridge-cron-python-sam

Deploy

sam buildsam deploy --guided


Testing

See the GitHub repo for detailed testing instructions.

Cleanup

Delete the stack: sam delete.

Created by:

Sidharth Kothari

Cloud Engineer @AWS

Follow on LinkedIn