AWS Cross Region Replication : Step by Step Setup

Rashmi Bhardwaj | Blog,Cloud & Virtualization
Google ADs

AWS Cross Region Replication

Cross Region Replication refers to the ability of replicating the objects from one AWS S3 bucket to another AWS S3 bucket in a different region.

AWS Cross Region Replication

Few Pre-requisites to enable Cross Region Replication:

  • Two AWS S3 buckets in different region.
  • Enable versioning on both the buckets.
  • Data Already in the source bucket isn’t replicated, any subsequent object files will be replicated asynchronously.
  • Delete makers aren’t replicated.

Step 1

Login to AWS Management Console, we have a bucket named ‘srcipwithease’ in N.Virginia region already created.

Google ADs

AWS Cross Region Replication

This bucket doesn’t have versioning enabled as below:

AWS Cross Region Replication2

In order to setup CRR we need to enable Versioning on the Source Bucket.

Step 2

Goto Management Tab of the bucket > Click on Replication > Click Get Started

AWS Cross Region Replication3

Step 3

Enable Versioning on the next window. You can either replicate the entire bucket or tags to the destination bucket. Suppose you want to replicate the entire bucket and then click on the Next.

AWS Cross Region Replication4
AWS Cross Region Replication5

Enter the Destination Bucket on Next Window and Click on Create New Bucket.

AWS Cross Region Replication6

On next window enter the name of the destination bucket, and assign this bucket a different region. We named it as ‘dstipwithease’ and in region Apac(Mumbai). Click Next.

AWS Cross Region Replication7

On the next window create a new IAM role to allow for the Replication to happen. Click Create Role & then enter name of Role and Click Next.

AWS Cross Region Replication8

Review the settings and Click Save

AWS Cross Region Replication9

Once you click save you will see the replication has been setup successfully as below.

AWS Cross Region Replication10

Now if we browse to the S3, we can see our Source and Destination buckets already created as below:

AWS Cross Region Replication11

At the moment we don’t have any objects available in the source bucket to be replicated, hence let’s go ahead and add an object to bucket srcipwithease.

AWS Cross Region Replication12

We uploaded the file named logo and can been seen in source bucket as below:

AWS Cross Region Replication13

The object wont’ be public by default, hence lets go ahead and make the object as Public.

AWS Cross Region Replication14

Step 4

Go ahead and check if the object is replicated in the destination bucket, you shall be able to see the object is replicated to the destination region as below:

AWS Cross Region Replication15

Step 5

Now let us go to the source bucket and delete the original object from and see if its delete’s the file from destination bucket as well.

AWS Cross Region Replication16
AWS Cross Region Replication17

You see the object is deleted from the source bucket.

AWS Cross Region Replication18

Now if you browse to the destination bucket, you can still see the object in there which proves that delete markers aren’t replicated across regions.

AWS Cross Region Replication19

You can also see under IAM a role that was created to allow for the replication as below:

AWS Cross Region Replication20

Related – AWS S3 Replication

ABOUT THE AUTHOR


Leave a Comment

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

Shopping Cart