Skip to content

Commit 206afd7

Browse files
authored
Add final pattern file
1 parent 51c747b commit 206afd7

1 file changed

Lines changed: 108 additions & 0 deletions

File tree

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
{
2+
"title": "Function chaining with AWS Lambda durable functions",
3+
"description": "Demonstrates the function chaining pattern using Lambda durable functions with automatic checkpointing and fault-tolerant sequential execution",
4+
"language": "Python",
5+
"level": "200",
6+
"framework": "AWS SAM",
7+
"introBox": {
8+
"headline": "How it works",
9+
"text": [
10+
"This pattern demonstrates the function chaining pattern using Lambda durable functions.",
11+
"A durable orchestrator function chains three Lambda functions sequentially using context.invoke().",
12+
"Each invocation creates an automatic checkpoint, enabling the workflow to resume from the last successful step after failures.",
13+
"Step 1 (Add) initializes data and adds 10 to the input value.",
14+
"Step 2 (Transform) doubles the value and transforms the name to uppercase.",
15+
"Step 3 (Finalize) adds 5 to the value and sets the completion status.",
16+
"The pattern showcases fault-tolerant workflow orchestration without managing state infrastructure."
17+
]
18+
},
19+
"gitHub": {
20+
"template": {
21+
"repoURL": "https://github.com/aws-samples/serverless-patterns/tree/main/lambda-durable-function-chaining-sam",
22+
"templateURL": "serverless-patterns/lambda-durable-function-chaining-sam",
23+
"projectFolder": "lambda-durable-function-chaining-sam",
24+
"templateFile": "template.yaml"
25+
}
26+
},
27+
"resources": {
28+
"bullets": [
29+
{
30+
"text": "Lambda durable functions Documentation",
31+
"link": "https://docs.aws.amazon.com/lambda/latest/dg/durable-functions.html"
32+
},
33+
{
34+
"text": "Durable Execution SDK for Python",
35+
"link": "https://github.com/aws/aws-durable-execution-sdk-python"
36+
},
37+
{
38+
"text": "AWS Blog: Build multi-step applications with Lambda durable functions",
39+
"link": "https://aws.amazon.com/blogs/aws/build-multi-step-applications-and-ai-workflows-with-aws-lambda-durable-functions/"
40+
}
41+
]
42+
},
43+
"deploy": {
44+
"text": [
45+
"sam build",
46+
"sam deploy --guided"
47+
]
48+
},
49+
"testing": {
50+
"text": [
51+
"Get the orchestrator alias ARN from stack outputs:",
52+
"<code>DURABLE_FUNCTION_ARN=$(aws cloudformation describe-stacks --stack-name durable-function-chaining --query 'Stacks[0].Outputs[?OutputKey==`OrchestratorAliasArn`].OutputValue' --output text)</code>",
53+
"Invoke the workflow:",
54+
"<code>aws lambda invoke --function-name \"$DURABLE_FUNCTION_ARN\" --payload '{\"id\": \"test-123\", \"name\": \"demo\", \"value\": 5}' --cli-binary-format raw-in-base64-out response.json</code>",
55+
"<code>cat response.json</code>",
56+
"Expected output shows value transformation: 5 → +10 (step1) → ×2 (step2) → +5 (step3) = 35"
57+
]
58+
},
59+
"cleanup": {
60+
"text": [
61+
"Delete the stack: <code>sam delete</code>"
62+
]
63+
},
64+
"authors": [
65+
{
66+
"name": "Sahil Bhimjiani",
67+
"image": "https://drive.google.com/file/d/1E2p7S5UtU36x6Sk1xPS3XnSGJyIUoqK7/view?usp=drivesdk",
68+
"bio": "Sahil Bhimjiani is a Solutions Architect at Amazon Web Services.",
69+
"linkedin": "sahil9701"
70+
},
71+
{
72+
"name": "Anup Rajpara",
73+
"image": "https://drive.google.com/file/d/1MqpPNLCqbU4kvvtTspNXZBqD99aVIJI9/view?usp=sharing",
74+
"bio": "Anup is a Sr. Technical Account Manager at Amazon Web Services. He is passionate about serverless & event-driven architectures.",
75+
"linkedin": "anup-rajpara-developer/"
76+
}
77+
],
78+
"patternArch": {
79+
"icon1": {
80+
"x": 25,
81+
"y": 50,
82+
"service": "lambda",
83+
"label": "AWS Lambda durable functions"
84+
},
85+
"icon2": {
86+
"x": 80,
87+
"y": 25,
88+
"service": "lambda",
89+
"label": "AWS Lambda"
90+
},
91+
"icon3": {
92+
"x": 80,
93+
"y": 65,
94+
"service": "lambda",
95+
"label": "AWS Lambda"
96+
},
97+
"line1": {
98+
"from": "icon1",
99+
"to": "icon2",
100+
"label": ""
101+
},
102+
"line2": {
103+
"from": "icon1",
104+
"to": "icon3",
105+
"label": ""
106+
}
107+
}
108+
}

0 commit comments

Comments
 (0)