[{"data":1,"prerenderedAt":75},["ShallowReactive",2],{"pattern-eventbridge-custom-bus-cross-account-python-sam":3,"pattern-group-eventbridge-custom-bus-cross-account-python-sam":6},{"id":4,"title":5,"architectureURL":6,"cleanup":7,"contributors":10,"deploy":12,"description":16,"extension":17,"framework":18,"gitHub":19,"highlight":6,"introBox":23,"language":29,"level":30,"meta":31,"patternArch":32,"patternGroup":6,"patternGroupLabel":6,"resources":59,"stem":70,"testing":71,"videoId":6,"__hash__":74},"patterns\u002Fpatterns\u002Feventbridge-custom-bus-cross-account-python-sam.json","Amazon EventBridge custom event bus cross-account sharing with AWS Resource Access Manager",null,{"text":8},[9],"Delete the consumer stack first, then the owner stack: \u003Ccode>sam delete\u003C\u002Fcode> in each account.",[11],"content\u002Fcontributors\u002Fanusha-ganapuram.json",{"text":13},[14,15],"Owner account: sam deploy --stack-name xacct-bus-owner --resolve-s3 --parameter-overrides Role=Owner SharePrincipal=\u003CCONSUMER_ACCOUNT_ID>","Consumer account: sam deploy --stack-name xacct-bus-consumer --resolve-s3 --capabilities CAPABILITY_IAM --parameter-overrides Role=Consumer SharedBusArn=\u003CBUS_ARN>","Share one Amazon EventBridge custom event bus across accounts with AWS RAM. A consumer account subscribes and delivers events to an AWS Lambda function.","json","AWS SAM",{"template":20},{"patternPath":21,"templateFile":22},"eventbridge-custom-bus-cross-account\u002Fpython\u002Fsam","template.yaml",{"headline":24,"text":25},"How it works",[26,27,28],"An owner account creates an Amazon EventBridge custom event bus, sets its retention period, and shares it with other accounts in the organization using AWS Resource Access Manager (AWS RAM) with the SubscribeOnly managed permission.","A consumer account creates its own subscriber on the shared bus, together with the AWS Lambda function the subscriber invokes, an IAM delivery role, and an Amazon SQS dead-letter queue for failed deliveries. Each consumer owns its subscribers; the bus owner configures no routing on their behalf.","Deploy the single template once per account with the Role parameter set to Owner or Consumer. Publish events with the AWS CLI and confirm delivery in the consumer Lambda's Amazon CloudWatch logs.","Python","200",{},{"group1":33,"group2":39,"icon1":42,"icon2":47,"icon3":51,"line1":55},{"x":34,"y":35,"w":36,"h":37,"label":38},2,13,40,85,"Owner account",{"x":40,"y":35,"w":36,"h":37,"label":41},58,"Consumer account",{"x":43,"y":44,"service":45,"label":46},22,37,"eventbridge","Amazon EventBridge",{"x":43,"y":48,"service":49,"label":50},72,"ram","AWS RAM Resource share",{"x":52,"y":44,"service":53,"label":54},78,"lambda-event-functions","AWS Lambda \nConsumer function",{"from":56,"to":57,"label":58},"icon1","icon3","Subscriber",{"bullets":60},[61,64,67],{"text":62,"link":63},"What is the EventBridge custom event bus?","https:\u002F\u002Fdocs.aws.amazon.com\u002Feventbridge\u002Flatest\u002Fuserguide\u002Feb-custom-bus-what-is.html",{"text":65,"link":66},"Sharing a custom event bus with other accounts","https:\u002F\u002Fdocs.aws.amazon.com\u002Feventbridge\u002Flatest\u002Fuserguide\u002Feb-custom-bus-sharing.html",{"text":68,"link":69},"Subscribing to events on a custom event bus","https:\u002F\u002Fdocs.aws.amazon.com\u002Feventbridge\u002Flatest\u002Fuserguide\u002Feb-custom-bus-subscribers.html","patterns\u002Feventbridge-custom-bus-cross-account-python-sam",{"text":72},[73],"See the GitHub repo for detailed testing instructions.","qMtqJvrNpT359pxTl_LwUnmPKYWgacqdC6-EyoyBbLY",1794832009565]