You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Use 'Lambda durable functions' (lowercase) throughout
- Use full AWS service names (Amazon API Gateway, Amazon DynamoDB, Amazon SNS)
- Update regional availability note to be future-proof
- Remove duplicate monitoring sections
- Remove unnecessary DynamoDB monitoring section
- Make deployment instructions less prescriptive
- Rewrite bullet points as full sentences
- Add explanation for dual timeout configuration
- Update LinkedIn format to username only
Copy file name to clipboardExpand all lines: lambda-durable-human-approval-sam/README.md
+16-51Lines changed: 16 additions & 51 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,22 +1,22 @@
1
-
# Human-in-the-Loop Approval Workflow with Lambda Durable Functions
1
+
# Human-in-the-Loop Approval Workflow with AWS Lambda durable functions
2
2
3
-
This pattern demonstrates a human-in-the-loop approval workflow using AWS Lambda Durable Functions. The workflow pauses execution for up to 24 hours while waiting for human approval via email, automatically handling timeouts and resuming when decisions are received.
3
+
This pattern demonstrates a human-in-the-loop approval workflow using AWS Lambda durable functions. The workflow pauses execution for up to 24 hours while waiting for human approval via email, automatically handling timeouts and resuming when decisions are received.
4
4
5
-
**Important:** Lambda Durable Functions are currently available in the **us-east-2 (Ohio)** region only.
5
+
**Important:** Lambda durable functions have limited regional availability. Please check the [AWS documentation](https://docs.aws.amazon.com/lambda/latest/dg/durable-functions.html) for current regional support.
6
6
7
7
Learn more about this pattern at Serverless Land Patterns: https://serverlessland.com/patterns/lambda-durable-hitl-approval-sam
8
8
9
9
## Architecture
10
10
11
11

12
12
13
-
The pattern uses Lambda Durable Functions to implement a cost-effective approval workflow that can wait up to 24 hours without incurring compute charges during the wait period.
13
+
The pattern uses Lambda durable functions to implement a cost-effective approval workflow that can wait up to 24 hours without incurring compute charges during the wait period.
14
14
15
15
### Workflow Steps
16
16
17
-
1.**User submits approval request** via API Gateway
17
+
1.**User submits approval request** via Amazon API Gateway
18
18
2.**Durable Function validates request** and creates a callback
19
-
3.**UUID mapping stored in DynamoDB** (callback ID → UUID)
19
+
3.**UUID mapping stored in Amazon DynamoDB** (callback ID → UUID)
20
20
4.**Email notification sent via SNS** with approve/reject links
21
21
5.**Function pauses execution** (no compute charges during wait)
22
22
6.**Approver clicks link** in email
@@ -57,16 +57,11 @@ The pattern uses Lambda Durable Functions to implement a cost-effective approval
During the guided deployment, provide the required values:
61
+
-**ApproverEmail**: Enter your email address to receive approval notifications
62
+
- Allow SAM CLI to create IAM roles when prompted
68
63
69
-
4.**Confirm SNS subscription**: Check your email and click the confirmation link from AWS SNS
64
+
4.**Confirm SNS subscription**: Check your email and click the confirmation link from Amazon SNS
70
65
71
66
5. Note the `ApiEndpoint` from the outputs
72
67
@@ -101,24 +96,9 @@ You'll receive an email with:
101
96
102
97
### Click Approve or Reject
103
98
104
-
Click one of the links in the email. You'll see a confirmation page with:
105
-
- ✓ or ✗ icon
106
-
- "Request Approved!" or "Request Rejected!" message
107
-
- Confirmation that the workflow has been notified
99
+
Click one of the links in the email. You'll see a confirmation page that displays a checkmark or X icon along with either a "Request Approved!" or "Request Rejected!" message. The page will also confirm that the workflow has been notified of your decision.
Both values must match: `ExecutionTimeout`sets the maximum runtime for the durable function, while `CallbackConfig.timeout` sets how long the callback will wait before timing out.
177
+
206
178
### Change Email Address
207
179
208
180
Update during deployment or redeploy with new email:
Copy file name to clipboardExpand all lines: lambda-durable-human-approval-sam/example-pattern.json
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -1,13 +1,13 @@
1
1
{
2
-
"title": "Human-in-the-Loop Approval Workflow with Lambda Durable Functions",
2
+
"title": "Human-in-the-Loop Approval Workflow with Lambda durable functions",
3
3
"description": "Approval workflow that pauses execution while waiting for human decisions, with automatic timeout handling and callback-based resumption",
4
4
"language": "Python",
5
5
"level": "300",
6
6
"framework": "AWS SAM",
7
7
"introBox": {
8
8
"headline": "How it works",
9
9
"text": [
10
-
"This pattern demonstrates a human-in-the-loop approval workflow using Lambda Durable Functions with callback operations.",
10
+
"This pattern demonstrates a human-in-the-loop approval workflow using Lambda durable functions with callback operations.",
11
11
"The workflow pauses execution using create_callback() while waiting for human approval, incurring no compute charges during the wait period.",
12
12
"If no decision is received within 24 hours, the workflow automatically times out and rejects the request.",
13
13
"When an approver submits a decision via API, the durable function resumes from its checkpoint and processes the result.",
"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.",
0 commit comments