AWS Certified Developer – Associate — Question 304

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 correct because Amazon EventBridge supports cross-account event routing by allowing a target event bus in another account to receive events, provided the receiver's bus policy permits it. Option B is incorrect because EventBridge rules cannot directly target an SQS queue in a different AWS account. Option A is incorrect because EC2 cannot be configured to directly publish events to a cross-account event bus without an EventBridge rule in the source account, and Option C is an inefficient polling mechanism that does not leverage real-time event-driven architecture.