Search code examples
amazon-web-servicesamazon-s3data-transfer

Cost of copying files between Amazon S3 buckets in different Accounts


I want to copy the S3 files in my account to a different AWS account.

How do I copy without a data transfer fee?

Example command:

aws s3 cp s3://sourceBucket/file s3://targetBucket/

Does it transfer files over the Internet or does AWS transfer over the internal network?

Data size: 71TB


Solution

  • If the source and destination buckets are in the same Region, then there is no Data Transfer cost.

    A few tips when copying objects between buckets owned by different Accounts:

    • You will need to use a set of credentials that has both GetObject permission on the source bucket and PutObject permission on the destination bucket
    • If you are using credentials from the source account, then make sure you use --acl bucket-owner-full-control otherwise the destination account will not be able to access/read/delete the object. This is why it is often better to use credentials from the destination account to copy the object.