Skip to content

Commit 6a2a751

Browse files
authored
Add final pattern file
1 parent f6282ad commit 6a2a751

File tree

1 file changed

+92
-0
lines changed

1 file changed

+92
-0
lines changed
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
{
2+
"title": "Human-in-the-Loop Approval Workflow with Lambda durable functions",
3+
"description": "Approval workflow that pauses execution while waiting for human decisions, with automatic timeout handling and callback-based resumption",
4+
"language": "Python",
5+
"level": "300",
6+
"framework": "AWS SAM",
7+
"introBox": {
8+
"headline": "How it works",
9+
"text": [
10+
"This pattern demonstrates a human-in-the-loop approval workflow using Lambda durable functions with callback operations.",
11+
"The workflow pauses execution using create_callback() while waiting for human approval, incurring no compute charges during the wait period.",
12+
"If no decision is received within 24 hours, the workflow automatically times out and rejects the request.",
13+
"When an approver submits a decision via API, the durable function resumes from its checkpoint and processes the result.",
14+
"The pattern uses DynamoDB to map short UUIDs to callback IDs for clean approval URLs, and SNS to send email notifications with approve/reject links."
15+
]
16+
},
17+
"gitHub": {
18+
"template": {
19+
"repoURL": "https://github.com/aws-samples/serverless-patterns/tree/main/lambda-durable-human-approval-sam",
20+
"templateURL": "serverless-patterns/lambda-durable-human-approval-sam",
21+
"projectFolder": "lambda-durable-human-approval-sam",
22+
"templateFile": "template.yaml"
23+
}
24+
},
25+
"resources": {
26+
"bullets": [
27+
{
28+
"text": "Lambda durable functions Documentation",
29+
"link": "https://docs.aws.amazon.com/lambda/latest/dg/durable-functions.html"
30+
},
31+
{
32+
"text": "Durable Execution SDK for Python",
33+
"link": "https://github.com/aws/aws-durable-execution-sdk-python"
34+
}
35+
]
36+
},
37+
"deploy": {
38+
"text": [
39+
"Note: Lambda durable functions have limited regional availability. Please check the AWS documentation for current regional support.",
40+
"sam build",
41+
"sam deploy --guided --region us-east-2"
42+
]
43+
},
44+
"testing": {
45+
"text": [
46+
"See the GitHub repo for detailed testing instructions."
47+
]
48+
},
49+
"cleanup": {
50+
"text": [
51+
"Delete the stack: <code>sam delete --region us-east-2</code>."
52+
]
53+
},
54+
"authors": [
55+
{
56+
"name": "Abhishek Agawane",
57+
"image": "https://drive.google.com/file/d/1E-5koDaKEaMUtOctX32I9TLwfh3kgpAq/view?usp=drivesdk",
58+
"bio": "Abhishek Agawane is a Security Consultant at Amazon Web Services with more than 8 years of industry experience. He helps organizations architect resilient, secure, and efficient cloud environments, guiding them through complex challenges and large-scale infrastructure transformations. He has helped numerous organizations enhance their cloud operations through targeted optimizations, robust architectures, and best-practice implementations.",
59+
"linkedin": "agawabhi"
60+
}
61+
],
62+
"patternArch": {
63+
"icon1": {
64+
"x": 15,
65+
"y": 50,
66+
"service": "apigw",
67+
"label": "Amazon API Gateway"
68+
},
69+
"icon2": {
70+
"x": 50,
71+
"y": 50,
72+
"service": "lambda",
73+
"label": "AWS Lambda durable functions"
74+
},
75+
"icon3": {
76+
"x": 85,
77+
"y": 50,
78+
"service": "dynamodb",
79+
"label": "Amazon DynamoDB"
80+
},
81+
"line1": {
82+
"from": "icon1",
83+
"to": "icon2",
84+
"label": ""
85+
},
86+
"line2": {
87+
"from": "icon2",
88+
"to": "icon3",
89+
"label": ""
90+
}
91+
}
92+
}

0 commit comments

Comments
 (0)