This project demonstrates a high-level flow of using AWS Lambda Durable Functions with a callback mechanism to handle human or external system approvals in a serverless workflow.
-
Durable Lambda Function
- Executes the initial logic (e.g., preparing a document).
- Sends a notification (e.g., to a human or system) requesting approval.
- Pauses execution and emits a Callback ID.
-
External Interaction / Human Action
- An external system or human receives the approval request.
- They perform an action (e.g., approve or reject) and trigger an API call to resume the Durable Lambda function.
-
Notify Lambda Function (Callback Handler)
- Receives the callback with the
Callback IDand the decision (approveorreject). - Calls
send_durable_execution_callback_successto resume the Durable Lambda function.
- Receives the callback with the
-
Durable Lambda Resumes
- Based on the callback response, continues execution:
- If approved → finalizes the workflow.
- If rejected → archives or handles rejection logic.
- Based on the callback response, continues execution: