AWS Certified Developer – Associate (DVA-C02) — Question 5

A company is running Amazon EC2 instances in multiple AWS accounts. A developer needs to implement an application that collects all the lifecycle events of the EC2 instances. The application needs to store the lifecycle events in a single Amazon Simple Queue Service (Amazon SQS) queue in the company's main AWS account for further processing.
Which solution will meet these requirements?

Answer options

Correct answer: D

Explanation

Option D is the correct solution as it establishes the necessary permissions for the event bus to receive events from all accounts and ensures that the lifecycle events are routed correctly to the SQS queue in the main account. Option A does not address the permissions needed for cross-account event delivery. Option B focuses on resource policies which may not effectively aggregate events as required. Option C relies on a Lambda function for polling, which is less efficient compared to direct event routing through EventBridge.