To copy data from S3 bucket cross accounts

0

Hi AWS, I have to replicate CUR data from bucket in account A to destination bucket in account B. Now I am confused that which pattern to use for the same and why:

  1. Use Lambda function
  2. DataSync
  3. S3 Cross account replication

I have an additional question which is extension to the question https://repost.aws/questions/QUjCk76rHXTiiD24kbYRYbXQ/copy-data-cross-account-cross-region-using-datasync where I am still facing the error Execution exec-056dfghgdxxxxxx finished with status Unable to connect to S3 endpoint. The only distinction is I am using Customer Managed Key (CMK) for both source and destination buckets and I have updated the KMS key policies perfectly but still that issue persists.

Please help me with both the questions.

1 Answer
1

Thank you for your question.

The easiest way is to set-up cross account replication.

Setting up replication when source and destination buckets are owned by different AWS accounts is similar to setting replication when both buckets are owned by the same account. The only difference is that the destination bucket owner must grant the source bucket owner permission to replicate objects by adding a bucket policy.

Take a look at this walk-through on the official documentation

You can also take a look at this article to learn How to use AWS DataSync to transfer the data to or from a cross-account Amazon S3 location?

AWS
David C
answered 7 months ago
  • Hi David C, thanks for the comment but I have few questions around the cross account replication:

    1. How long does it take to replicate the existing objects from source bucket to destination bucket as it's been more than 12 hours since I have created the rule but the objects are not yet replicated.
    2. I want to replicate only a few objects from source bucket to destination bucket so for e.g. if the bucket URI is s3://<source-bucket-name>/dev/ to destination bucket under the filter do I need to give only the folder name dev/ or full path.
    3. Is it mandatory that I need to use batch replication to copy the existing objects to destination bucket and if so any specific reason why?

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions