当前位置: 动力学知识库 > 问答 > 编程问答 >

amazon s3 - How to migrate S3 bucket to another account

问题描述:

I need to move data from an S3 bucket to another bucket, on a different account.

I was able to sync buckets by running:

aws s3 sync s3://my_old_bucket s3://my_new_bucket --profile myprofile

myprofile contents:

[profile myprofile]

aws_access_key_id = old_account_key_id

aws_secret_access_key = old_account_secret_access_key

I have also set policies both on origin and destination. Origins allows listing and getting, and destination allows posting.

The commands works perfectly and I can log in to the other account and see the files. But I can't take ownership or make the new bucket public. I need to be able to make changes as I was able to in the old account. New account is totally unrelated to new account. It looks like files are retaining permissions and they are still owned by the old account.

How can I set permissions in order to gain full access to files with the new account?

分享给朋友:
您可能感兴趣的文章:
随机阅读: