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.

< 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-tf/cd step-functions-workflows-collection/human-in-the-loop

Deploy

terraform initterraform apply


Testing

See the GitHub repo for detailed testing instructions.

Cleanup

1. Delete the stack: terraform destroy.

Created by:

Ahmad Aboushady

Ahmad Aboushady

Senior Technical Account Manager, AWS