Q91 — AWS DVA-C02 Ch.1

Question 91 of 100 | ← Chapter 1

A company configured an Amazon S3 bucket to send S3 object events to Amazon EventBridge (Amazon CloudWatch Events). An EventBridge rule invokes an AWS Lambda function for each object event received from the S3 bucket. A developer is building a new version of the Lambda function. To ensure the new Lambda function behaves as expected, the developer must perform repeatable tests using real S3 object events. The developer must minimize the amount of code and infrastructure required to support testing. Which solution meets these requirements?

Correct Answer: C. Use EventBridge archive and replay production S3 object events. Configure a new EventBridge rule to deliver the replayed S3 object events to the new Lambda function.

Explanation

Option C is the most appropriate solution. Using EventBridge archive and replay of production S3 object events allows direct use of real event data for testing, eliminating the need to create new buckets or develop complex tools to generate test events—thus minimizing code and infrastructure required for testing. Option A requires creating a new bucket and developing a tool, increasing complexity; Option B routes events to both old and new functions simultaneously, potentially causing confusion and failing to isolate testing of the new function; Option D requires unnecessary development effort to build a PutEvents-based tool. Therefore, Option C best satisfies the requirements.