简体   繁体   中英

AWS cross region replication to multiple regions?

I am trying to set up cross region replication so that my original file will be replicated to two different regions. Right now, I can only get it to replicate to one other region.

For example, my files are on US Standard. When a file is uploaded it is replicated from US Standard to US West 2. I would also like for that file to be replicated to US West 1.

Is there a way to do this?

It appears the Cross-Region Replication in Amazon S3 cannot be chained . Therefore, it cannot be used to replicate from Bucket A to Bucket B to Bucket C.

An alternative would be to use the AWS Command-Line Interface (CLI) to synchronise between buckets, eg:

aws s3 sync s3://bucket1 s3://bucket2
aws s3 sync s3://bucket1 s3://bucket3

The sync command only copies new and changed files. Data is transferred directly between the Amazon S3 buckets, even if they are in different regions -- no data is downloaded/uploaded to your own computer.

So, put these commands in a cron job or a Scheduled Task to run once an hour and the buckets will nicely replicate!

See: AWS CLI S3 sync command documentation

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM