matt525252
matt525252

Reputation: 732

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).

Upvotes: 1

Views: 5039

Answers (2)

Dr.Bob
Dr.Bob

Reputation: 1162

AWS finally came up with a solution for this: S3 batch operations.

S3 Batch Operations is an Amazon S3 data management feature that lets you manage billions of objects at scale with just a few clicks in the Amazon S3 Management Console or a single API request. With this feature, you can make changes to object metadata and properties, or perform other storage management tasks, such as copying objects between buckets, replacing object tag sets, modifying access controls, and restoring archived objects from S3 Glacier — instead of taking months to develop custom applications to perform these tasks.

It allows you to replicate data at bucket, prefix or object level, from any region to any region, between any storage class (e.g. S3 <> Glacier) and across AWS accounts! No matter if it's thousands, millions or billions of objects.

This introduction video has an overview of the options (my apologies if I almost sound like a salesperson, I'm just very excited about it as I have a couple of million objects to copy ;-) https://aws.amazon.com/s3/s3batchoperations-videos/

Upvotes: 4

Kannaiyan
Kannaiyan

Reputation: 13025

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.

Upvotes: 1

Related Questions