Amazon EventBridge Cron to AWS Lambda durable function

Amazon EventBridge → AWS Lambda durable function → DataProcessor function → NotificationSvcs function

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

This sample project demonstrates how to create a Lambda durable function that is triggered by Amazon EventBridge 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 Node.js 24 runtime, an Amazon EventBridge rule with cron schedule, and uses function versioning to ensure the cron trigger targets a published version rather than $LATEST.

< 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-nodejs-sam

Deploy

sam buildsam deploy --guided


Testing

See the GitHub repo for detailed testing instructions.

Cleanup

Delete the stack: sam delete.

Created by:

Anusha Ganapuram

Anusha Ganapuram

Technical Account Manager at AWS with deep expertise in serverless and event-driven solutions. Passionate about building scalable, secure and distributed applications that help organizations modernize their infrastructure and accelerate innovation.

Follow on LinkedIn