Reputation: 201
Is there a way to know if the two S3 buckets between which I have set up cross-region replication, are in Sync or not? As there are possible cases where the buckets may go out of sync, e.g..:
Delete an object from my source bucket, and the object is deleted in my target bucket (as object deletes are propagated)
Restore the deleted object in my source bucket, and the restore is not propagated so my source and target bucket are now out of sync
thanks
Upvotes: 0
Views: 1546
Reputation: 65
Deletion of the delete markers are not replicated across regions to prevent malicious file deletions.
Delete Operation and Cross-Region Replication
If you delete an object from the source bucket, the cross-region replication behavior is as follows:
If a DELETE request is made without specifying an object version ID, Amazon S3 adds a delete marker, which cross-region replication replicates to the destination bucket. For more information about versioning and delete markers, see Using Versioning. If a DELETE request specifies a particular object version ID to delete, Amazon S3 deletes that object version in the source bucket, but it does not replicate the deletion in the destination bucket (in other words, it does not delete the same object version from the destination bucket). This behavior protects data from malicious deletions.
Upvotes: 1
Reputation: 269470
There might be a timing delay between bucket replication -- this is why replicated buckets require Versioning to be turned on, so that delayed propagations will still have access to the source data.
Also, any objects in the source bucket prior to turning on replication will not be replicated to the target.
There is no API call available to verify the replication, but you could list the contents of both buckets and compare them.
Upvotes: 0