S3 Cross Region Replication with CloudFormation

DTS Solutions
2 min readSep 3, 2020

AWS S3 is the most used object-level storage service in the industry when we talk about cloud providers, this is due the multiple benefits that this service provides such as durability of 99.999999999%, multiple storage classes or the option to interact with it through the browser or API (Like most AWS services).

One of the most attractive and interesting features that AWS S3 can provide us, is Cross-Region Replication (CRR), which allows replicating the data stored in one S3 bucket to another in a different region — remember S3 is a regional service — which ensures further the durability of our data helping with disaster recovery purposes.

Enough talking, let’s get down to business and enable S3 Cross-Region Replication on a bucket using CloudFormation:

We will create two CloudFormation stacks, one in Virginia region where our main bucket will reside and other in Ohio, where we will replicate the data.

Virginia Resources:

Make sure you correctly enter the key IDs in the role as without them the replication will not work.

Ohio Resources:

Happy deployment!

Important: To enable existing object replication for your account, you must contact AWS Support, for more information: https://docs.aws.amazon.com/AmazonS3/latest/dev/replication-what-is-isnot-replicated.html#existing-object-replication

In future articles, we will show you how to automate the deployment of infrastructure as code on AWS. Stay tuned. Your comments are very important, we want to know your topics of interest.

--

--