Human in the Loop

Wait for an approval from a human reviewer before continuing

This pattern allows you to integrate an human review or approval process into your workflows.
The task sends a message to a SNS topic which sends a notification to a human reviewer or approver by email for example. The workflow then waits until the approver completes their review. Depending on the review outcome a different Lambda function can be invoked.
Waiting for completion of the review is done using the .waitForTaskToken service integration. The payload of the SNS message contains a task token, which is automatically generated by AWS Step Functions.
The task will pause until it receives that task token back with a SendTaskSuccess or SendTaskFailure API call.

Launch Stack
< Back to all workflows

GitHub icon View this workflow on GitHub


Clone repo

git clone https://github.com/aws-samples/step-functions-workflows-collection/tree/main/human-in-the-loop/cd step-functions-workflows-collection/human-in-the-loop

Deploy

sam deploy --guided


Testing

See the GitHub repo for detailed testing instructions.

Cleanup

1. Delete the stack: sam delete.

Created by:

Ben Freiberg

Ben Freiberg

Ben is a Senior Solutions Architect at Amazon Web Services (AWS) based in Frankfurt, Germany.

Follow on LinkedIn