[{"data":1,"prerenderedAt":74},["ShallowReactive",2],{"pattern-sfn-eventbridge-lambda-sam-java":3},{"id":4,"title":5,"architectureURL":6,"cleanup":7,"contributors":15,"deploy":17,"description":20,"extension":21,"framework":22,"gitHub":23,"highlight":6,"introBox":29,"language":37,"level":38,"meta":39,"patternArch":40,"resources":59,"s3URL":6,"services":6,"stem":68,"testing":69,"videoId":6,"__hash__":73},"patterns\u002Fpatterns\u002Fsfn-eventbridge-lambda-sam-java.json","AWS Step Functions to Amazon EventBridge to AWS Lambda",null,{"headline":8,"text":9},"Cleanup",[10,11,12,13,14],"1. Execute the Step Functions workflow:","\u003Ccode>aws stepfunctions start-execution --state-machine-arn ENTER_YOUR_STATE_MACHINE_ARN\u003C\u002Fcode>","2. View CloudWatch Logs to see events that Step Functions published to EventBridge:","\u003Ccode>aws logs tail CLOUDWATCH_LOG_GROUP\u003C\u002Fcode>","3. You see an event that was delivered to the event bus.",[16],"content\u002Fcontributors\u002Frazvan-minciuna.json",{"text":18},[19],"sam deploy --guided","Creates a Step Functions workflow that publishes events to EventBridge, routing to Lambda.","json","AWS SAM",{"template":24},{"projectFolder":25,"repoURL":26,"templateURL":27,"templateFile":28},"stepfunctions-eventbridge-lambda-sam-java","https:\u002F\u002Fgithub.com\u002Faws-samples\u002Fserverless-patterns\u002Ftree\u002Fmain\u002Fstepfunctions-eventbridge-lambda-sam-java","serverless-patterns\u002Fstepfunctions-eventbridge-lambda-sam-java","template.yml",{"headline":30,"text":31},"How it works",[32,33,34,35,36],"The SAM template contains all the information to deploy AWS resources(the Lambda functions, the EventBridge and the Step Functions workflow) and also the permission required by these service to communicate.","To test this pattern you need to start the State Machine ProcessOrder from your terminal or from AWS Console Step Function. The state machine will invoke the OrderState Lambda function which will create a OrderCreated object which will be sent to a custom EventBridge Bus and intercepted by an Event Pattern Rule.","The event pattern Rule will invoke the ProcessOrder Lambda function with the EventBridge message as a Payload.","You can see the event in the CloudWatch Logs - Log Group of the ProcessOrder Lambda function.","This is fully functional example implemented in Java 11.","Java","100",{},{"icon1":41,"icon2":46,"icon3":49,"line1":53,"line2":57},{"x":42,"y":43,"service":44,"label":45},20,50,"sfn","AWS Step Functions",{"x":43,"y":43,"service":47,"label":48},"eventbridge","Amazon EventBridge",{"x":50,"y":43,"service":51,"label":52},80,"lambda","AWS Lambda",{"from":54,"to":55,"label":56},"icon1","icon2","",{"from":55,"to":58,"label":56},"icon3",{"headline":60,"bullets":61},"Additional resources",[62,65],{"text":63,"link":64},"Reducing custom code by using advanced rules in Amazon EventBridge","https:\u002F\u002Faws.amazon.com\u002Fblogs\u002Fcompute\u002Freducing-custom-code-by-using-advanced-rules-in-amazon-eventbridge\u002F",{"text":66,"link":67},"Use Amazon EventBridge to Build Decoupled, Event-Driven Architectures","https:\u002F\u002Fserverlessland.com\u002Flearn\u002Feventbridge","patterns\u002Fsfn-eventbridge-lambda-sam-java",{"headline":70,"text":71},"Testing",[72],"See the GitHub repo for detailed testing instructions.","Ed_eq2tgzU2A4MbIUQy_Z3swnP2NBeVBASeR_-E3x6k",1779273339224]