casolorz
casolorz

Reputation: 9544

How can I replicate a bucket to multiple regions?

I have created a bucket on one region and would like to replicate it to multiple regions. I was able to get it replicated to one more region but I don't have any options to add more replication rules and I also tried chaining the bucket I replicated into by having it in turn replicate to another bucket but that doesn't seem to be happening.

How can I accomplish this?

Thanks.

Upvotes: 1

Views: 1125

Answers (2)

Asfand Qazi
Asfand Qazi

Reputation: 6875

Actually, there is an easier way - S3 supports it out of the box:

https://aws.amazon.com/blogs/aws/new-cross-region-replication-for-amazon-s3/

From the S3 console, go to the Cross-Region Replication page. It will prompt you to enable versioning if you have not already done so.

Then just choose the relevant options to enable replicating a subset or all your data, as well as where to replicate it to. You will have to create a role with enough permissions to read the source bucket and write to the target bucket.

Thus you do not need to mess with Kinesis/Lambdas.

Upvotes: 0

Kannaiyan
Kannaiyan

Reputation: 13025

This is how I solved it.

We had the same issue after the outage and want to replicate to multiple regions.

S3 (event trigger on Put) --> Lambda --> Kinesis (Stream) --> Lambda (Replicator)

when you copy the object from one region to another, check if it exists with md5 checksum.

We just add new objects, did not worry much about deletion.

Hope it helps.

Upvotes: 2

Related Questions