Which solution will meet these requirements?
Create another S3 bucket that can deliver object events to EventBridge. Add another EventBridge rule to deliver data events from the new S3 bucket to the new Lambda function Develop a tool to update objects in the new S3 bucket to produce the test S3 object events.
Add the new Lambda function as an additional target of the existing EventBridge rule. Deliver the S3 object events to the existing Lambda function and the new Lambda function simultaneously.
Use EventBridge to archive and replay production S3 object events. Set up a new EventBridge rule to deliver replayed S3 object events to the new Lambda function.
Develop a tool that uses the EventBridge PutEvents API operation to publish aws.s3 data events. Add a new EventBridge rule that delivers the aws.s3 events to the new Lambda function.
Explanations:
This option requires creating a new S3 bucket and an EventBridge rule, which increases the complexity and infrastructure needed. The developer needs a simpler solution to run repeatable tests.
Adding the new Lambda function as an additional target to the existing EventBridge rule would cause both functions to be invoked for every S3 event, which may not allow for isolated testing of the new function and could complicate debugging.
This option leverages EventBridge’s ability to archive and replay events, allowing the developer to use production events for testing. Setting up a new rule for the replayed events targets only the new Lambda function, minimizing infrastructure changes and supporting repeatable testing.
Developing a tool to use the PutEvents API adds unnecessary complexity and requires the developer to manage the event publishing manually. This option does not align with the goal of minimizing code and infrastructure for testing.