A company runs EC2 instances in multiple AWS accounts and wants a single SQS queue in the primary account to collect all EC2 instance lifecycle events from every account. Which design accomplishes this?
Choose an answer
Tap an option to check your answer.
Correct answer: Allow the primary account event bus to receive events from all accounts. In each account create an EventBridge rule to forward EC2 lifecycle events to the primary account event bus. In the primary account add an EventBridge rule that matches EC2 lifecycle events and sets the SQS queue as the target..
Why this is the answer
The correct design uses Amazon EventBridge's cross-account event delivery feature. By allowing the primary account's event bus to receive events from other accounts, and then configuring each source account to forward its EC2 lifecycle events to this central event bus, all events are consolidated. A single rule on the primary account's event bus can then filter these consolidated events and send them to the SQS queue.
Incorrect options:
Sending events directly to the primary account's EventBridge event bus from EC2 isn't how cross-account EventBridge works; events are forwarded via rules.
Directly sending messages to an SQS queue from EventBridge in other accounts is possible but less scalable for consolidation than using a central event bus.
A Lambda function for polling is inefficient and introduces latency compared to event-driven EventBridge.