Search code examples
amazon-web-servicesamazon-s3copybucket

Copy files from s3 bucket to another AWS account


Is it possible to send/sync files from source AWS S3 bucket into destination S3 bucket on a different AWS account, in a different location?

I found this: https://aws.amazon.com/premiumsupport/knowledge-center/copy-s3-objects-account/

But if I understand it correctly, this is the way how to sync files from destination account.

Is there a way how to do it other way around? Accessing destination bucket from source account (using source IAM user credentials).


Solution

  • That needs the right IAM and Bucket policy settings.

    A detailed configuration for cross account access, is discussed here

    Once you have it configured you can perform sync,

    aws s3 sync s3://sourcebucket s3://destinationbucket --recursive

    Hope it helps.