[{"data":1,"prerenderedAt":66},["ShallowReactive",2],{"workflow-human-in-the-loop-cdk":3},{"id":4,"title":5,"cleanup":6,"contributors":10,"deploy":12,"description":16,"diagram":17,"extension":18,"framework":19,"gitHub":20,"introBox":29,"level":37,"meta":38,"resources":40,"s3URL":52,"services":53,"simplicity":57,"stem":58,"testing":59,"type":63,"usecase":64,"videoId":28,"__hash__":65},"workflows\u002Fworkflows\u002Fhuman-in-the-loop-cdk.json","Human in the Loop (AWS CDK)",{"headline":7,"text":8},"Cleanup",[9],"Delete the stack: \u003Ccode>cdk destroy\u003C\u002Fcode>.",[11],"content\u002Fcontributors\u002Fyogesh-nain.json",{"text":13},[14,15],"1. Bootstrap CDK, if needed: \u003Ccode>cdk bootstrap aws:\u002F\u002F{your-aws-account-number}\u002F{your-aws-region}\u003C\u002Fcode>","2. Deploy the stack: \u003Ccode>cdk deploy --parameters ModeratorEmailAddress=your-email@example.com\u003C\u002Fcode>","Wait for an approval from a human reviewer with one-click email approve\u002Freject links","\u002Fassets\u002Fimages\u002Fworkflows\u002Fhuman-in-the-loop-cdk.svg","json","AWS CDK",{"template":21,"payloads":26},{"repoURL":22,"templateDir":23,"templateFile":24,"ASL":25},"https:\u002F\u002Fgithub.com\u002Faws-samples\u002Fstep-functions-workflows-collection\u002Ftree\u002Fmain\u002Fhuman-in-the-loop-cdk\u002F","human-in-the-loop-cdk","app.py","statemachine\u002Fstatemachine.asl.json",[27],{"headline":28,"payloadURL":28},"",{"headline":30,"text":31},"How it works",[32,33,34,35,36],"This pattern allows you to integrate a human review or approval process into your workflows with one-click email approval.","An AWS Lambda function sends an approval request via Amazon SNS email containing clickable approve\u002Freject links. The task token is URL-encoded to avoid issues with special characters in Amazon API Gateway URLs.","The workflow pauses using the .waitForTaskToken service integration until the reviewer clicks an approve or reject link.","The link triggers an Amazon API Gateway endpoint backed by an AWS Lambda function that calls SendTaskSuccess or SendTaskFailure to resume the AWS Step Functions workflow.","Depending on the review outcome, a different processing path is followed.","200",{"language":39},"Python",{"headline":41,"bullets":42},"Additional resources",[43,46,49],{"text":44,"link":45},"The AWS Step Functions Workshop","https:\u002F\u002Fcatalog.workshops.aws\u002Fstepfunctions\u002Fen-US",{"text":47,"link":48},"AWS Step Functions Task Tokens","https:\u002F\u002Fdocs.aws.amazon.com\u002Fstep-functions\u002Flatest\u002Fdg\u002Fconnect-to-resource.html#connect-wait-token",{"text":50,"link":51},"AWS CDK Developer Guide","https:\u002F\u002Fdocs.aws.amazon.com\u002Fcdk\u002Fv2\u002Fguide\u002Fhome.html",null,[54,55,56],"sns","lambda","apigw","2 - Pattern","workflows\u002Fhuman-in-the-loop-cdk",{"headline":60,"text":61},"Testing",[62],"See the GitHub repo for detailed testing instructions.","Standard","Automation","s2cWvd08YyWy4w-ZYI2YX6ZwDzf8gM733O_dM4SMeVU",1781174114606]