[{"data":1,"prerenderedAt":67},["ShallowReactive",2],{"pattern-eventbridge-cloudwatch":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":33,"level":34,"meta":35,"patternArch":36,"resources":49,"s3URL":6,"services":58,"stem":59,"testing":60,"videoId":28,"__hash__":66},"patterns\u002Fpatterns\u002Feventbridge-cloudwatch.json","Amazon EventBridge to Amazon CloudWatch Logs",null,{"headline":8,"text":9},"Cleanup",[10,11],"1. Delete the stack: \u003Ccode>sam delete --stack-name STACK_NAME\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\u002Fjames-beswick.json",{"text":15},[16],"sam deploy --guided","Create an EventBridge rule that sends events to CloudWatch Logs","json","AWS SAM",{"template":21,"payloads":26},{"projectFolder":22,"repoURL":23,"templateURL":24,"templateFile":25},"eventbridge-cloudwatch","https:\u002F\u002Fgithub.com\u002Faws-samples\u002Fserverless-patterns\u002Ftree\u002Fmain\u002Feventbridge-cloudwatch","serverless-patterns\u002Feventbridge-cloudwatch","template.yaml",[27],{"headline":28,"payloadURL":28},"",{"headline":30,"text":31,"test":28},"How it works",[32],"This template creates an EventBridge event bus and rule that publishes matched events to CloudWatch Logs. In this example, the rule filters for specific attributes in the event before sending to the CloudWatch Logs target.","Node.js","100",{},{"icon1":37,"icon2":42,"line1":46},{"x":38,"y":39,"service":40,"label":41},20,50,"eventbridge","EventBridge",{"x":43,"y":39,"service":44,"label":45},80,"cloudwatch","CloudWatch Logs",{"from":47,"to":48,"label":28},"icon1","icon2",{"headline":50,"bullets":51},"Additional resources",[52,55],{"text":53,"link":54},"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":56,"link":57},"Use Amazon EventBridge to Build Decoupled, Event-Driven Architectures","https:\u002F\u002Fserverlessland.com\u002Flearn\u002Feventbridge",{"from":40,"to":44},"patterns\u002Feventbridge-cloudwatch",{"headline":61,"text":62},"Testing",[63,64,65],"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. The event appears in the CloudWatch Logs stream called \u003Ccode>\u002Faws\u002Fevents\u002Fresource-policy-test\u003C\u002Fcode>.","kwUrVBYe1S8jrXUIKLePHcd0CRtxUtvDrZgh80DBdSY",1778846884465]