
Answer-first summary for fast verification
Answer: Establish permissions for the main account's EventBridge to accept events from all other accounts, and use EventBridge rules in each account to send lifecycle events to the main account's event bus, which then routes them to the SQS queue.
The correct answer is D. Configuring the permissions on the main account event bus to receive events from all accounts and creating EventBridge rules in each account to forward EC2 instance lifecycle events to the main account's event bus is an efficient and centralized solution. This setup enables the central event bus to manage and route all incoming lifecycle events to the SQS queue in the main account for further processing. This method leverages EventBridge's cross-account event routing capabilities, ensuring a streamlined and secure way to handle events across multiple AWS accounts.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
In a scenario with Amazon EC2 instances across multiple AWS accounts, how can a developer implement an application to collect and store all EC2 instance lifecycle events into a single Amazon SQS queue in the main AWS account?
A
Set up Amazon EC2 to send lifecycle events to the main account's EventBridge, then route these events to the SQS queue via an EventBridge rule.
B
Grant write permissions to the main account's SQS queue for all other accounts using resource policies, and configure EventBridge in each account to forward lifecycle events to the main account's SQS queue.
C
Deploy a Lambda function to monitor EC2 instances for lifecycle changes across accounts, and trigger the function to send notifications to the main account's SQS queue on detection.
D
Establish permissions for the main account's EventBridge to accept events from all other accounts, and use EventBridge rules in each account to send lifecycle events to the main account's event bus, which then routes them to the SQS queue.
No comments yet.