Skip to content

Commit 0127830

Browse files
Create lambda-durable-eventbridge-cron-nodejs-sam.json
1 parent 3797f37 commit 0127830

1 file changed

Lines changed: 101 additions & 0 deletions

File tree

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
{
2+
"title": "Amazon EventBridge Cron to Lambda durable function",
3+
"description": "Create a Lambda durable function triggered by Amazon EventBridge on a cron schedule using AWS SAM.",
4+
"language": "Node.js",
5+
"level": "200",
6+
"framework": "AWS SAM",
7+
"introBox": {
8+
"headline": "How it works",
9+
"text": [
10+
"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.",
11+
"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.",
12+
"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."
13+
]
14+
},
15+
"gitHub": {
16+
"template": {
17+
"repoURL": "https://github.com/aws-samples/serverless-patterns/tree/main/lambda-durable-eventbridge-cron-nodejs-sam",
18+
"templateURL": "serverless-patterns/lambda-durable-eventbridge-cron-nodejs-sam",
19+
"projectFolder": "lambda-durable-eventbridge-cron-nodejs-sam",
20+
"templateFile": "template.yaml"
21+
}
22+
},
23+
"resources": {
24+
"bullets": [
25+
{
26+
"text": "AWS Lambda durable functions",
27+
"link": "https://docs.aws.amazon.com/lambda/latest/dg/durable-functions.html"
28+
},
29+
{
30+
"text": "Invoking AWS Lambda durable functions",
31+
"link": "https://docs.aws.amazon.com/lambda/latest/dg/durable-invoking.html"
32+
},
33+
{
34+
"text": "AWS durable execution SDK for Node.js",
35+
"link": "https://github.com/aws/aws-durable-execution-sdk-js"
36+
}
37+
]
38+
},
39+
"deploy": {
40+
"text": [
41+
"sam build",
42+
"sam deploy --guided"
43+
]
44+
},
45+
"testing": {
46+
"text": [
47+
"See the GitHub repo for detailed testing instructions."
48+
]
49+
},
50+
"cleanup": {
51+
"text": [
52+
"Delete the stack: <code>sam delete</code>."
53+
]
54+
},
55+
"authors": [
56+
{
57+
"name": "Anusha Ganapuram",
58+
"image": "https://avatars.githubusercontent.com/u/58950933",
59+
"bio": "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.",
60+
"linkedin": "anushaganapuram"
61+
}
62+
],
63+
"patternArch": {
64+
"icon1": {
65+
"x": 20,
66+
"y": 50,
67+
"service": "eventbridge",
68+
"label": "EventBridge"
69+
},
70+
"icon2": {
71+
"x": 50,
72+
"y": 50,
73+
"service": "lambda",
74+
"label": "Lambda durable function"
75+
},
76+
"icon3": {
77+
"x": 80,
78+
"y": 20,
79+
"service": "lambda",
80+
"label": "DataProcessor Lambda function"
81+
},
82+
"icon4": {
83+
"x": 80,
84+
"y": 70,
85+
"service": "lambda",
86+
"label": "NotificationSvcs Lambda function"
87+
},
88+
"line1": {
89+
"from": "icon1",
90+
"to": "icon2"
91+
},
92+
"line2": {
93+
"from": "icon2",
94+
"to": "icon3"
95+
},
96+
"line3": {
97+
"from": "icon2",
98+
"to": "icon4"
99+
}
100+
}
101+
}

0 commit comments

Comments
 (0)