AWS cross region replication to multiple regions?

爱⌒轻易说出口 提交于 2021-01-27 13:51:03

问题


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?


回答1:


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



来源:https://stackoverflow.com/questions/31799923/aws-cross-region-replication-to-multiple-regions

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!