Human review process using AWS Step Functions.

Amazon API Gateway REST API → AWS Step Functions → Amazon SNS

Integrate a human review process into your workflow.

The application will create a AWS Step Functions State Machine, an Amazon SNS topic, and an Amazon API Gateway REST API.
The State Machine sends a message to an SNS topic which sends a notification to a human reviewer by email. The workflow then waits until the approver completes their review. When the reviewer makes a selection, it will trigger an API that sends the SendTaskSuccess API call with the chosen result.
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 patterns

GitHub icon Download this pattern (.zip)

GitHub icon View this pattern on GitHub


Clone repo

git clone https://github.com/aws-samples/serverless-patterns/cd serverless-patterns/stepfunctions-sns-apigw-human-review

Deploy

sam deploy --guided --capabilities CAPABILITY_IAM CAPABILITY_NAMED_IAM


Testing

See the GitHub repo for detailed testing instructions.

Cleanup

Delete the stack: sam delete.

Created by:

Sridhar Chevendra

Sridhar Chevendra

Sridhar uses customer-centric approach to build secure and scalable cloud architectures.

Follow on LinkedIn

Anup Rajpara

Anup Rajpara

Anup is passionate about serverless & event-driven architectures.

Follow on LinkedIn