{ "Version": "2012-10-17", "Statement": [ { "Sid": "PermissionsToAAccount", "Effect": "Allow", "Principal": { "AWS": "arn:aws:iam::XXXXXXX:root" }, "Action": "s3:*", "Resource": [ "arn:aws:s3:::DestinationS3Bucket", "arn:aws:s3:::DestinationS3Bucket/*" ] } ] }
When you copy files from one S3 bucket in account A using credentials of account A to a bucket in account B, the owner of the files in the destination bucket will be account A. (Account A is the principal that created the files in account B's bucket).
During the file copy from source to destination bucket, add the --acl bucket-owner-full-control
option so that account B can control the files. Otherwise you might have files in account B's bucket that account B cannot access or control.
Another option is to use the credentials of account B to copy from the source to the destination bucket. This way the owner of the copied files is account B.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With