NashTech Insights

How to setup S3 Cross Region Replication in AWS

Naincy Kumari
Naincy Kumari
Table of Contents

Hello Readers!! We are again back with another exciting topic i.e. How to set up S3 Cross Region Replication in AWS. First, let’s see what is cross region replication in AWS, and after that, we will see how we can perform its setup. 

Cross Region Replication:

Cross-region replication (CRR) is a feature provided by Amazon Simple Storage Service (S3) in AWS that allows automatic replication of data across different AWS regions. By using this, we can create a replica of our S3 bucket in a different region, which helps to enhance data durability, availability, and compliance. By replicating our data across multiple regions, CRR helps increase the durability of our objects. This enables faster access to our data for users in that region, reducing latency and improving overall availability.

Setup S3 Cross Region Replication in AWS:

Step 1: To set up Cross Region Replication in AWS, firstly we need to designate a source bucket and a destination bucket. The source bucket contains the data that we want to replicate, while the destination bucket is where the replicated data will reside in another region.

I am creating the source bucket here which is in the Mumbai region.

config

Its created successfully as we can see below.

cross region replication

As this bucket is initially empty. Let’s upload some objects inside the source bucket.

cross region replication

Step2: Now we have to create another bucket i.e. the destination bucket. It should be in another region as we are performing cross region replication. 

create bucket

Don’t forget to enable bucket versioning for both source and destination buckets. Versioning allows S3 to keep track of different versions of objects, which is essential for replication.

bucket version

Now, both buckets got created. 

buckets

Step 3: We need to add replication rules in the configuration of the source bucket. In the source bucket, we will define a replication configuration that specifies the destination bucket and other replication settings. For this move to S3 source bucket > Management > Replication rules > Create Replication rule.

replication rule
Source Bucket

Mention here your destination bucket where the replicated data will reside in another region.

Destination

We need to create IAM roles with appropriate permissions to allow S3 to replicate data across regions. These roles should have permission to read objects from the source bucket and write objects to the destination bucket.

IAM role

Click on Save.

It will ask your choice to replicate existing objects. Enter as per your need.

S3

Step 4: As I am not replicating existing objects, I need to add now some newly updated objects in the source bucket. So, that it will get replicated in the destination bucket.

You can see below I have uploaded a new version of the log.txt file.

cross region replication

Now, It should get replicated on the destination bucket. Let’s see.

cross region replication

Yes, it’s now uploaded to the bucket in another region. This is how cross region replication works in S3.

We are all done now!!

Conclusion

Thanks for being with me till the end. In this blog, we all learned about how to set up S3 Cross Region Replication in AWS. If you liked this blog then please share it with your friends. If you still have any queries then contact me at Naincy.Kumari@Nashtechglobal.com.

HAPPY LEARNING!!

Naincy Kumari

Naincy Kumari

Leave a Comment

Your email address will not be published. Required fields are marked *

Suggested Article

%d bloggers like this: