amazon-web-servicesamazon-s3replication

AWS S3 replication DstObjectHardDeleted error during replication


Background: We are currently trying to cutover from 1 AWS account to another. This includes getting a full copy of the S3 buckets into the new account (including all historical versions and timestamps). We first initiated replication to the new account's S3 buckets, ran a batch job to copy the historical data, and then tested against it. Afterward, we emptied the bucket to remove data added during testing, and then tried to redo the replication/batch job.

Now it seems AWS will not replicate the objects because it sees they did at one point exist in the bucket. Looking at the batch job's output, every object shows this:

{bucket} {key} {version} failed 500 DstObjectHardDeleted Currently object can't be replicated if this object previously existed in the destination but was recently deleted. Please try again at a later time

After seeing this, I deleted the destination bucket completely and recreated it, in the hope that it would flush out any previous traces of the data, and then I retried it. The same error occurs.

I cannot find any information on this error or even an acknowledgement in the AWS docs that this is expected or a potential issue.

Can anyone tell me how long we have to wait before replicating again? an hour? 24?

Is there any documentation on this error in AWS?

Is there anyway to get around this limitation?


Update: Retried periodically throughout the day, and never got an upload to replicate. Also I tried replicating instead to a third bucket, and then initiate replication from that new bucket to the original target. It throws the same error.


Update2: This post was made on a Friday. Retried the jobs today (the following Monday), and the error remains unchanged.


Update3: Probably the last update. Short version is I gave up, and made a different bucket to replicate it. If anyone has information on this, I'm still interested, I just can't waste anymore time on it.


Solution

  • Batch Replication does not support re-replicating objects that were hard-deleted (deleted with the version of the object) from the destination bucket.

    Below are possible workaround for this limitation:

    In summary, you can do S3 batch copy OR S3 replication to existing destination bucket only for new version ID objects. To replicate existing version ID objects of source bucket, you will have to use different/new destination bucket.