[{"data":1,"prerenderedAt":65},["ShallowReactive",2],{"pattern-cdk-eventbridge-stepfunction-sqs":3},{"id":4,"title":5,"architectureURL":6,"cleanup":7,"contributors":10,"deploy":12,"description":15,"extension":16,"framework":17,"gitHub":18,"highlight":6,"introBox":24,"language":30,"level":31,"meta":32,"patternArch":33,"resources":52,"s3URL":6,"services":6,"stem":60,"testing":61,"videoId":6,"__hash__":64},"patterns\u002Fpatterns\u002Fcdk-eventbridge-stepfunction-sqs.json","Amazon EventBridge to AWS Step Functions and failure events to Amazon SQS",null,{"text":8},[9],"Delete the stack: \u003Ccode>cdk delete\u003C\u002Fcode>.",[11],"content\u002Fcontributors\u002Fshankar-srinivasan.json",{"text":13},[14],"cdk deploy","Create a Step Functions workflow to Send Failure event to SQS for operational needs.","json","AWS CDK",{"template":19},{"repoURL":20,"templateURL":21,"projectFolder":22,"templateFile":23},"https:\u002F\u002Fgithub.com\u002Faws-samples\u002Fserverless-patterns\u002Ftree\u002Fmain\u002Fcdk-eventbridge-stepfunction-sqs","serverless-patterns\u002Fcdk-eventbridge-stepfunction-sqs","cdk-eventbridge-stepfunction-sqs","cdk\u002Flib\u002Feventbridge-stepfunction-sqs-stack.ts",{"headline":25,"text":26},"How it works",[27,28,29],"This sample project demonstrates how to use an AWS Step Functions state machine to send failure event to SQS.","This pattern is leveraging the native integration between the eventBridge to step function andto SQS services . Successfull event invokes Step function and executes lambda function successfully and completes the step function state machine successfully. Failure event invokes Step function and executes lambda function which throws custom exception and get retried 2 times using Step function error hanlder. After retry is exhausted, Catch handler moves the state machine Failure SQS. Stepfunction writes Failure message to the SQS using native 'SendMessage' task which can be handled for operational needs.","This pattern deploys one Step Functions, two SQS queue, one Custom Event bus and one lambda function.","TypeScript","200",{},{"icon1":34,"icon2":39,"icon3":42,"line1":46,"line2":50},{"x":35,"y":36,"service":37,"label":38},20,50,"eventbridge","Amazon EventBridge",{"x":36,"y":36,"service":40,"label":41},"sfn","Step Functions",{"x":43,"y":36,"service":44,"label":45},80,"sqs","SQS",{"from":47,"to":48,"label":49},"icon1","icon2","",{"from":48,"to":51,"label":49},"icon3",{"bullets":53},[54,57],{"text":55,"link":56},"CDK Custom Resource","https:\u002F\u002Fdocs.aws.amazon.com\u002Fcdk\u002Fapi\u002Fv2\u002Fdocs\u002Faws-cdk-lib.custom_resources.AwsCustomResource.html",{"text":58,"link":59},"Call Amazon SQS with Step Functions","https:\u002F\u002Fdocs.aws.amazon.com\u002Fstep-functions\u002Flatest\u002Fdg\u002Fconnect-sqs.html","patterns\u002Fcdk-eventbridge-stepfunction-sqs",{"text":62},[63],"See the GitHub repo for detailed testing instructions.","SNTCZ_DqZOqDZOwNs3c1JsV_Wc4XWZ9fJQO_oUP0mNc",1779273334035]