‫So just a short lecture explaining
‫how to do multi-account event aggregation with EventBridge.
‫So say for example that you have multiple accounts in AWS
‫but you wanted to centrally manage some of these events
‫in a central account event bus.
‫And say you're launching EC2 instances
‫in all your accounts and you want to actually catch
‫these events in the central account.
‫So how would you do this?
‫Well, you would define an event pattern
‫in one of your accounts and then you would create
‫an event rule for it, so that all the state changes
‫of account A are sent to the event rule.
‫And it turns out that the targets of an event rule
‫in one account can be an event bus in another account.
‫So, to make it work, so that the account A
‫can send into the central accounts,
‫we need to create a resource policy on the event bus
‫of the central account to accept events from other accounts.
‫So that makes sense?
‫Then we can do the exact same pattern
‫in account B and D and C,
‫so that we have all the events and all the state changes
‫of our EC2 instances that will land onto the event bus
‫of the central accounts.
‫From there, we can just create the own event rule
‫on the event bus, for example to trigger SNS notifications,
‫or lender functions, or whatever you want.
‫So that's it, just one thing to know
‫in terms of architecture,
‫I hope you liked it and I will see you in the next lecture.