New Pattern Submission — sam-dotnet-durablefunction-expenseapproval
Pattern Details
- Title: Lambda Durable Function — Expense Approval with Human Interaction (.NET)
- Description: A durable function expense approval workflow that pauses execution to wait for a manager's approval callback, with a 72-hour durable timer fallback.
- Language: .NET (C#)
- Framework: SAM
- Level: 300
- Services: AWS Lambda, Amazon API Gateway, Amazon DynamoDB
How It Works
This pattern deploys a Lambda durable function that implements an expense approval workflow. After an expense is submitted, the function creates a callback token and suspends execution — consuming zero compute while waiting for a manager's decision.
A manager can approve or reject the expense via a separate API endpoint that sends the callback. If no response arrives within 72 hours, a durable timer automatically rejects the expense.
This demonstrates the human-in-the-loop pattern with Lambda durable functions: WaitForCallback for external events, durable timers for deadlines, and DynamoDB for persisting expense state.
GitHub PR for template:
#3243
Author
- Name: Doug Perkes
- Bio: Senior Solutions Architect at AWS, focused on .NET and serverless.
- LinkedIn: dougperkes
New Pattern Submission — sam-dotnet-durablefunction-expenseapproval
Pattern Details
How It Works
This pattern deploys a Lambda durable function that implements an expense approval workflow. After an expense is submitted, the function creates a callback token and suspends execution — consuming zero compute while waiting for a manager's decision.
A manager can approve or reject the expense via a separate API endpoint that sends the callback. If no response arrives within 72 hours, a durable timer automatically rejects the expense.
This demonstrates the human-in-the-loop pattern with Lambda durable functions: WaitForCallback for external events, durable timers for deadlines, and DynamoDB for persisting expense state.
GitHub PR for template:
#3243
Author