[{"data":1,"prerenderedAt":72},["ShallowReactive",2],{"pattern-sfn-callback-cdk":3},{"id":4,"title":5,"architectureURL":6,"cleanup":7,"contributors":12,"deploy":14,"description":17,"extension":18,"framework":19,"gitHub":20,"highlight":6,"introBox":29,"language":35,"level":36,"meta":37,"patternArch":38,"resources":56,"s3URL":6,"services":65,"stem":66,"testing":67,"videoId":28,"__hash__":71},"patterns\u002Fpatterns\u002Fsfn-callback-cdk.json","AWS Step Functions to Amazon SQS with callback",null,{"headline":8,"text":9},"Cleanup",[10,11],"1. Delete the stack: \u003Ccode>cdk destroy\u003C\u002Fcode>.","2. Confirm the stack has been deleted: \u003Ccode>aws cloudformation list-stacks --query \"StackSummaries[?contains(StackName,'STACK_NAME')].StackStatus\"\u003C\u002Fcode>.",[13],"content\u002Fcontributors\u002Fcorneliu-croitoru.json",{"text":15},[16],"cdk deploy","Create an AWS Step Functions workflow with a callback.","json","AWS CDK",{"template":21,"payloads":26},{"projectFolder":22,"repoURL":23,"templateURL":24,"templateFile":25},"sfn-callback-cdk","https:\u002F\u002Fgithub.com\u002Faws-samples\u002Fserverless-patterns\u002Ftree\u002Fmain\u002Fsfn-callback-cdk","serverless-patterns\u002Fsfn-callback-cdk","step_function_callback\u002Fstep_function_callback_stack.py",[27],{"headline":28,"payloadURL":28},"",{"headline":30,"text":31},"How it works",[32,33,34],"The Step Functions workflow has one task which will send a message to the SQS queue and waits for a token to be sent back.","The message contains the input of the task and a token. The Lambda function is used to call to Step Functions API with the token.","Between the SQS queue and the Lambda function, there could an external service that consumes the message from the SQS queue and calls the Lambda function with the token.","Python","200",{},{"icon1":39,"icon2":44,"icon3":47,"line1":51,"line2":54},{"x":40,"y":41,"service":42,"label":43},20,50,"sfn","Step Functions",{"x":41,"y":41,"service":45,"label":46},"sqs","SQS",{"x":48,"y":41,"service":49,"label":50},80,"lambda","AWS Lambda",{"from":52,"to":53,"label":28},"icon1","icon2",{"from":53,"to":55,"label":28},"icon3",{"headline":57,"bullets":58},"Additional resources",[59,62],{"text":60,"link":61},"Synchronous Express Workflows for AWS Step Functions","https:\u002F\u002Faws.amazon.com\u002Fblogs\u002Fcompute\u002Fnew-synchronous-express-workflows-for-aws-step-functions\u002F",{"text":63,"link":64},"Integrating AWS Step Functions callbacks and external systems","https:\u002F\u002Faws.amazon.com\u002Fblogs\u002Fcompute\u002Fintegrating-aws-step-functions-callbacks-and-external-systems\u002F",{"from":42,"to":45},"patterns\u002Fsfn-callback-cdk",{"headline":68,"text":69},"Testing",[70],"See the GitHub repo for detailed testing instructions.","R0lB11RuHRtIid3lNFLtMLGUAKUX1W25Fs9Lmlc33mY",1781692548200]