AWS Lambda durable functions Human-in-the-Loop Approval Workflow

Amazon API Gateway → AWS Lambda durable functions → Amazon DynamoDB

Approval workflow that pauses execution while waiting for human decisions, with automatic timeout handling and callback-based resumption

This pattern demonstrates a human-in-the-loop approval workflow using Lambda durable functions with callback operations.
The workflow pauses execution using create_callback() while waiting for human approval, incurring no compute charges during the wait period.
If no decision is received within 24 hours, the workflow automatically times out and rejects the request.
When an approver submits a decision via API, the durable function resumes from its checkpoint and processes the result.
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.

< 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-human-approval-sam

Deploy

Note: Lambda durable functions have limited regional availability. Please check the AWS documentation for current regional support.sam buildsam deploy --guided --region us-east-2


Testing

See the GitHub repo for detailed testing instructions.

Cleanup

Delete the stack: sam delete --region us-east-2.

Created by:

Abhishek Agawane

Abhishek Agawane

I am a Cloud Support Engineer (Serverless) at AWS who loves cloud computing