Is it possible to copy between AWS accounts using AWS CLI?

后端 未结 4 1415
谎友^
谎友^ 2020-12-30 06:28

Is it possible using AWS CLI to copy the contents of S3 buckets between AWS accounts? I know it\'s possible to copy/sync between buckets in the same account, but I need to g

4条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-30 06:56

    In my case below mentioned command will work, hope so this will work for you as well. I have two different AWS accounts in different regions, and I want to copy my old bucket content into new one bucket. I have AWS CLI configured with two profiles.

    Used the following aws cli command:

    aws s3 cp --profile  s3://source_bucket_path/ --profile  s3://destination_bucket_path/ --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers --recursive
    

提交回复
热议问题