Some of the complexity of replication lies around deletion of objects and versioning plays a major role there.
If you delete an object from the source bucket, the following actions occur by default:
-
If you make a DELETE request without specifying an object version ID, Amazon S3 adds a delete marker. Amazon S3 deals with the delete marker as follows:
-
If you are using the latest version of the replication configuration (that is, you specify the Filter element in a replication configuration rule), Amazon S3 does not replicate the delete marker by default. However you can add delete marker replication to non-tag-based rules, for more information see Replicating delete markers between buckets.
-
If you don't specify the Filter element, Amazon S3 assumes that the replication configuration is version V1, and it replicates delete markers that resulted from user actions. However, if Amazon S3 deletes an object due to a lifecycle action, the delete marker is not replicated to the destination buckets.
-
-
If you specify an object version ID to delete in a DELETE request, Amazon S3 deletes that object version in the source bucket. But it doesn't replicate the deletion in the destination buckets. In other words, it doesn't delete the same object version from the destination buckets. This protects data from malicious deletions.
Relevant questions
Versioning on Snowball Edge
Accepted Answerasked 3 years agoI need to transfer objects from s3 bucket to another s3 in the same account
asked 17 hours agoAmazon S3 Versioning
Accepted Answerasked 2 years agoS3 Bucket Object Versioning & Lifecycle Rules - Applied to Existing Objects or only New?
Accepted Answerasked 5 years agoHow do we unzip a file in S3 bucket using C#.NET
asked 3 months agoAWS Transfer Family cannot download with S3 Versioning enabled
asked 2 years agoWhy do we need S3 bucket versioning enabled in order to do replication?
Accepted Answerasked a year agoHow do I restore deleted files in S3?
asked 5 months agoS3 bucket replication with Object lock. "Contact support"
asked 5 months agoManually set S3 replication status
Accepted Answerasked 2 years ago