Home > Mobile >  is it possible to copy s3 bucket content from one bucket to another account s3 bucket without using
is it possible to copy s3 bucket content from one bucket to another account s3 bucket without using

Time:10-01

I want to copy the S3 bucket object to a different account, but the requirement can't use the Bucket policy, then is it possible to copy content from one bucket to another without using the bucket policy?

CodePudding user response:

You cannot use native S3 object replication between different accounts without using a bucket policy. As stated in the permissions documentation:

When the source and destination buckets aren't owned by the same accounts, the owner of the destination bucket must also add a bucket policy to grant the owner of the source bucket permissions to perform replication actions

You could write a custom application that uses IAM roles to replicate objects, but this will likely be quite involved as you'll need to track the state of the bucket and all of the objects written to it.

CodePudding user response:

install AWS CLI, run AWS configure set source bucket credentials as default and, visit https://github.com/Shi191099/S3-Copy-old-data-without-Policy.git

  • Related