[{"data":1,"prerenderedAt":65},["ShallowReactive",2],{"pattern-eventbridge-lambda-sls":3},{"id":4,"title":5,"architectureURL":6,"cleanup":7,"contributors":12,"deploy":14,"description":17,"extension":18,"framework":19,"gitHub":20,"highlight":6,"introBox":26,"language":32,"level":33,"meta":34,"patternArch":35,"resources":48,"s3URL":6,"services":6,"stem":57,"testing":58,"videoId":6,"__hash__":64},"patterns\u002Fpatterns\u002Feventbridge-lambda-sls.json","Amazon EventBridge to AWS Lambda",null,{"headline":8,"text":9},"Cleanup",[10,11],"1. Delete the stack: \u003Ccode>serverless remove --verbose\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\u002Fdmitry-gulin.json",{"text":15},[16],"serverless deploy --verbose","Create an EventBridge rule that invokes a Lambda function","json","Serverless Framework",{"template":21},{"projectFolder":22,"repoURL":23,"templateURL":24,"templateFile":25},"eventbridge-lambda-sls","https:\u002F\u002Fgithub.com\u002Faws-samples\u002Fserverless-patterns\u002Ftree\u002Fmain\u002Feventbridge-lambda-sls","serverless-patterns\u002Feventbridge-lambda-sls","serverless.yml",{"headline":27,"text":28,"test":31},"How it works",[29,30],"This template deploys a Lambda function that is triggered by an EventBridge rule. In this example, the rule filters for specific attributes in the event before invoking the function.","The Events section of the AWS::Serverless::Function type also sets up the required permissions for EventBridge to invoke this specific function.","","TypeScript","100",{},{"icon1":36,"icon2":41,"line1":45},{"x":37,"y":38,"service":39,"label":40},20,50,"eventbridge","EventBridge",{"x":42,"y":38,"service":43,"label":44},80,"lambda","AWS Lambda",{"from":46,"to":47,"label":31},"icon1","icon2",{"headline":49,"bullets":50},"Additional resources",[51,54],{"text":52,"link":53},"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":55,"link":56},"Use Amazon EventBridge to Build Decoupled, Event-Driven Architectures","https:\u002F\u002Fserverlessland.com\u002Flearn\u002Feventbridge","patterns\u002Feventbridge-lambda-sls",{"headline":59,"text":60},"Testing",[61,62,63],"Use the AWS CLI to send a test event to EventBridge and observe the event delivered to the Lambda function:","1. Send an event to EventBridge: \u003Ccode>aws events put-events --entries file:\u002F\u002Fevent.json\u003C\u002Fcode>.","2. Retrieve the logs from the Lambda function: \u003Ccode>sam logs -n ENTER_YOUR_CONSUMER_FUNCTION_NAME\u003C\u002Fcode>.","X5tbVWZ20tXgBjs_OnZCtI99gvV2N7Sgs2asqMFVn6Y",1781346943928]