AWS跨区域复制到多个区域? [英] AWS cross region replication to multiple regions?

查看:536
本文介绍了AWS跨区域复制到多个区域?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试设置跨区域复制,以便将我的原始文件复制到两个不同的区域.现在,我只能将其复制到另一个区域.

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.

例如,我的文件使用的是美国标准.上传文件后,该文件将从美国标准复制到美国西部2.我也希望将该文件复制到美国西部1.

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?

推荐答案

似乎Amazon S3中的跨区域复制无法链接.因此,它不能用于从存储区A复制到存储区B到存储区C.

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.

一种替代方法是使用 AWS命令行界面(CLI)在存储桶之间进行同步,例如:

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

sync 命令仅复制新文件和更改的文件.数据直接在Amazon S3存储桶之间进行传输,即使它们位于不同的区域-也不会将数据下载/上传到您自己的计算机上.

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.

因此,将这些命令放在 cron 作业或计划任务"中,使其每小时运行一次,存储桶将很好地复制!

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

请参阅: AWS CLI S3同步命令文档

这篇关于AWS跨区域复制到多个区域?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆