Question 30
Domain 5: Incident and Event ResponseA company deploys an application to two AWS Regions. The application creates and stores objects in an Amazon S3 bucket that is in the same Region as the application. Both deployments of the application need to have access to all the objects and their metadata from both Regions. The company has configured two-way replication between the S3 buckets and has enabled S3 Replication metrics on each S3 bucket. A DevOps engineer needs to implement a solution that retries the replication process if an object fails to replicate. Which solution will meet these requirements?
Correct answer: D
Explanation
Amazon S3 Replication metrics provide visibility into replication failures, and S3 event notifications can trigger automation when an object replication fails. Using an AWS Lambda function with S3 Batch Operations lets the engineer "retry the replication on the existing object" by reprocessing the failed object and its metadata in the destination Region.
Why each option is right or wrong
A. Create an Amazon EventBridge rule that listens to S3 event notifications for failed replication events. Create an AWS Lambda function that downloads the failed replication object and then runs a PutObject command for the object to the destination bucket. Configure the EventBridge rule to invoke the Lambda function to handle the object that failed to replicate.
Manual PutObject copies the object but does not truly retry S3 replication behavior for existing failed items.
B. Create an Amazon Simple Queue Service (Amazon SQS) queue. Configure S3 event notifications to send failed replication notifications to the SQS queue. Create an AWS Lambda function that downloads the failed replication object and then runs a PutObject command for the object to the destination bucket. Configure the Lambda function to poll the queue for notifications to process.
Adding SQS changes notification delivery, but still relies on custom object copying instead of replication retry.
C. Create an Amazon EventBridge rule that listens to S3 event notifications for failed replications. Create an AWS Lambda function that downloads the failed replication object and then runs a PutObject command for the object to the destination bucket.
EventBridge plus Lambda alone detects failure, but lacks the proper mechanism to retry replication on existing objects.
D. Create an AWS Lambda function that will use S3 batch operations to retry the replication on the existing object for a failed replication. Configure S3 event notifications to send failed replication notifications to the Lambda function.
Amazon S3 Replication metrics expose failed-replication events, and S3 event notifications can be configured to invoke a Lambda target when those failures occur. Under the S3 Batch Operations model, the Lambda function can then reprocess the specific failed object in place, which is the supported way to retry replication for an existing object rather than creating a new one; this is what preserves the object and its metadata across the two Regions.