Ultimate access to all questions.
Upgrade Now 🚀
Sign in to unlock AI tutor
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.