S3 replication: requirements, RTC and Batch Replication
S3 replication needs versioning on both the source and destination buckets and permission for Amazon S3 to replicate on your behalf. The Amazon S3 User Guide says live replication copies only objects created after the configuration exists. S3 Replication Time Control replicates 99.9 percent of objects within 15 minutes, and S3 Batch Replication copies existing objects on demand.
What does S3 replication require?
Both the source and destination buckets must have versioning enabled. Amazon S3 needs permission to replicate objects on your behalf. If the source bucket has S3 Object Lock enabled, the destination must have it too. Across accounts, the destination bucket owner must grant the source bucket owner permission with a bucket policy. A destination bucket cannot be a Requester Pays bucket.
By default S3 replicates objects created after you add the replication configuration, along with their metadata. With the current configuration version, which uses the Filter element, delete markers are not replicated unless you turn on delete marker replication. Deleting a specific object version in the source is never replicated to the destination.
What does S3 Replication Time Control guarantee?
S3 RTC replicates most objects in seconds and 99.9 percent of them within 15 minutes. Rules with S3 RTC publish S3 Replication metrics, such as operations and bytes pending replication. It also provides the OperationMissedThreshold and OperationReplicatedAfterThreshold events, delivered through S3 Event Notifications to Amazon SQS, Amazon SNS or AWS Lambda, for objects that miss the 15-minute threshold or replicate after it.
The S3 RTC service level agreement does not apply while the replication data transfer rate is above the default quota of 1 Gbps. You can request a higher quota through Service Quotas or AWS Support. The SLA also does not apply while the S3 request rate guidelines are exceeded.
When do you need S3 Batch Replication?
Live replication skips three kinds of object: objects that existed before the configuration, objects that were already replicated to a different destination, and objects that are themselves replicas made by another rule. If you change the destination bucket in a rule, S3 does not replicate the earlier objects again. S3 Batch Replication handles these cases, and objects that failed replication, as an on-demand Batch Operations job.
The source bucket must already have a replication configuration. The job needs a manifest, which S3 can generate. The ObjectReplicationStatuses filter selects objects by status: NONE for never replicated, FAILED, COMPLETED for replicated before, and REPLICA.
Batch Replication is not supported for objects in S3 Glacier Flexible Retrieval or S3 Glacier Deep Archive. AWS recommends disabling lifecycle rules while a job runs.
Where the exam catches people
Believing versioning is needed only on the source bucket: both buckets must have versioning enabled.
Believing a new replication rule copies objects already in the bucket: live replication covers objects created after the configuration. Use Batch Replication for the rest.
Believing a changed destination gets the old objects: objects already replicated elsewhere are not replicated again. Run Batch Replication with the COMPLETED status included.
Believing the S3 RTC 15-minute commitment holds at any transfer rate: the SLA does not apply above the default 1 Gbps quota.
Believing a replica is replicated onward by another rule: replicas are not replicated by default.