neOn
neOn

Reputation: 21

How to migrate s3 to another account

I need to migrate s3 bucket to another account. All the data could be easily made with s3 sync. However, is it possible to migrate to another account and do not change the following:

Upvotes: 0

Views: 763

Answers (1)

John Rotenstein
John Rotenstein

Reputation: 269091

Every Amazon S3 bucket name is unique. Therefore, the only way to give a bucket to another account would be:

  • Empty the bucket
  • Delete the bucket
  • Wait (might take a few hours for the name to become available)
  • Create a bucket with the same name in the other account

This would then preserve the URL to the bucket.

Access Keys and Secret Keys are tied to a specific account. In fact, you can generate multiple Access Keys via IAM. It is not possible to transfer these credentials to a different account.

Tip: When copying the content of a bucket to another bucket, make sure you use --acl bucket-owner-full-control to give control of the objects to the new account.

Upvotes: 1

Related Questions