[{"data":1,"prerenderedAt":68},["ShallowReactive",2],{"pattern-eventbridge-sns":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":34,"level":35,"meta":36,"patternArch":37,"resources":50,"s3URL":6,"services":59,"stem":60,"testing":61,"videoId":28,"__hash__":67},"patterns\u002Fpatterns\u002Feventbridge-sns.json","Amazon EventBridge to Amazon SNS",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 invokes an SNS topic","json","AWS SAM",{"template":21,"payloads":26},{"projectFolder":22,"repoURL":23,"templateURL":24,"templateFile":25},"eventbridge-sns","https:\u002F\u002Fgithub.com\u002Faws-samples\u002Fserverless-patterns\u002Ftree\u002Fmain\u002Feventbridge-sns","serverless-patterns\u002Feventbridge-sns","template.yaml",[27],{"headline":28,"payloadURL":28},"",{"headline":30,"text":31},"How it works",[32,33],"The AWS SAM template deploys an SNS topic that is triggered by an EventBridge rule. The SNS topic policy provides the permission for EventBridge to invoke the SNS topic.","In this example, the EventBridge rule specified in template filters the events based upon the criteria in the EventPattern section. When matching events are sent to EventBridge that trigger the rule, they are delivered as a JSON event payload to the SNS topic.","Node.js","100",{},{"icon1":38,"icon2":43,"line1":47},{"x":39,"y":40,"service":41,"label":42},20,50,"eventbridge","EventBridge",{"x":44,"y":40,"service":45,"label":46},80,"sns","SNS",{"from":48,"to":49,"label":28},"icon1","icon2",{"headline":51,"bullets":52},"Additional resources",[53,56],{"text":54,"link":55},"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":57,"link":58},"Use Amazon EventBridge to Build Decoupled, Event-Driven Architectures","https:\u002F\u002Fserverlessland.com\u002Flearn\u002Feventbridge",{"from":41,"to":45},"patterns\u002Feventbridge-sns",{"headline":62,"text":63},"Testing",[64,65,66],"1. Subscribe your email address to the SNS topic: \u003Ccode>aws sns subscribe --topic-arn ENTER_YOUR_TOPIC_ARN --protocol email-json --notification-endpoint ENTER_YOUR_EMAIL_ADDRESS\u003C\u002Fcode>","2. Click the confirmation link delivered to your email to verify the endpoint.","3. Send an event to EventBridge: \u003Cbr>\u003Ccode>aws events put-events --entries file:\u002F\u002Fevent.json\u003Cbr>The event is delivered to your email address.\u003C\u002Fcode>","TlUizTpVOTSqmbmqH6PJhUihRQy_PLElw1iPLf0gd5s",1778927708576]