AWS S3 Cross Region Replication: A Comprehensive
Published: 2023-12-22 04:25:39

AWS S3 Cross Region Replication (CRR) is a feature that allows you to automatically replicate data from one S3 bucket in one AWS region to another S3 bucket in a different region. This is a great way to ensure that your data is always available, even if there is a disruption in one region.

Why use CRR? ☂️

CRR has a number of benefits, including:

Disaster recovery: CRR can help you protect your data from natural disasters or other events that could disrupt one region.
Compliance: Some businesses must store data in multiple regions for compliance reasons. CRR can help you to meet these requirements.
Performance: CRR can improve performance for users in different regions by reducing latency.
How to set up CRR 🛠️

To set up CRR, you will need to:

Create a source bucket and a destination bucket in different regions.
Enable versioning on both buckets.
Create a replication rule in the source bucket.
AWS S3 Cross Region Replication: A guide with emojis 🌎

AWS S3 Cross Region Replication (CRR) is a feature that allows you to automatically replicate data from one S3 bucket in one AWS region to another S3 bucket in a different region. This is a great way to ensure that your data is always available, even if there is a disruption in one region.

Why use CRR? ☂️

CRR has a number of benefits, including:

Disaster recovery: CRR can help you to protect your data from natural disasters or other events that could disrupt one region.
Compliance: Some businesses are required to store data in multiple regions for compliance reasons. CRR can help you to meet these requirements.
Performance: CRR can improve performance for users in different regions by reducing latency.
How to set up CRR 🛠️

To set up CRR, you will need to:

Create a source bucket and a destination bucket in different regions.
Enable versioning on both buckets.
Create a replication rule in the source bucket.
Here is a step-by-step guide with emojis:

Step 1: Create a source bucket and a destination bucket in different regions. 🌎 Enable versioning on both buckets. ☂️


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qsb4iotvuyzjg6hmbg2l.png)


Source Bucket


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rxesj3lq4c16nxbsookf.png)


With enabling Bucket Versioning


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xgd0oyvhzkmpitqsp43k.png)


Destination Bucket — 2


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2qn74k35sghizd1z1m3w.png)


Enabling Versioning — Bucket 2
Step 2: Click on the Management tab of the source bucket and select Replication. ⚙️


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lt3fy6znfuk8y04capj4.png)


Bucket-1 — Goto Management Tab
Click on the Create Replication Rule button. 🆕


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ldw3704tqtiqen3ui6bh.png)


Give Rule Name


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/v3epexvadbo60ijxav87.png)


Select Source Bucket — Select Apply to all objects
Next Step, Select the destination bucket from the list of buckets. 🪣


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kzom05x3uveyslm128dr.png)



![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qq39wqzuy275zcdy2plg.png)


Select Destination Bucket-2
Next➡️, Scroll down and Create IAM Role,


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/a3b4n6yfxo1sl4ekc4mb.png)


Create new role
Next click on Save button to create rule. New screen will appear on your screen.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dr8nvxljd5fjanbgpzcn.png)


Select No and Click on the Submit button.
Review the settings and click on the Create Rule button. ✅


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5c91lshziqertcg5hof7.png)


New Replication Rule created for Bucket 1
The last step is to test whether the rule created is properly working as desired or not. Let's upload one object in Bucket-1 and check whether it will get a replica in bucket-2 or not.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pse3oyqi4j0ly9deopgs.png)


Bucket -1 — uploaded one image file
After a few seconds, you can see same file available in bucket -2 as well.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/oaksbrujgg006cc24nkz.png)



Conclusion
Here I had implemented AWS S3's Cross-Region Replication in-depth. This involved replicating objects from a source bucket in the North Virginia (us-east-1) region to a destination bucket in the Ohio (us-east-2) region. The replication process was set up to mirror the latest version of content from North Virginia, thus providing an updated representation of the static website in Ohio. By utilizing the features of S3's Cross-Region Replication, here established a reliable and consistent content delivery mechanism across different regions.