Human in the Loop

Wait for an approval from a human reviewer before continuing

This pattern allows you to integrate a human review or approval process into your workflows with one-click email approval.
A Lambda function URL-encodes the task token and sends an email via SNS with clickable approve and reject links pointing to an API Gateway endpoint. The reviewer clicks a link to approve or reject without needing the CLI.
An API Gateway REST API receives the callback, and a handler Lambda decodes the task token and calls SendTaskSuccess to resume the workflow.
The workflow uses the .waitForTaskToken service integration to pause until the reviewer responds.

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