AWS

How to Enable Cross Region Replication for Amazon S3

In this blog, I will explore how to enable cross region replication in different AWS regions. One is Tokyo and one is in Ohio region. Replication copies recently created objects & object updates from a source bucket to a destination bucket. Replication is the automated, nonsynchronous copying of objects crosses buckets in the different or same AWS Regions. For more details about S3 buckets replication concepts and how to utilize replication with the AWS CLI, AWS SDKs.

Enable Cross Region Replication

Create an S3 Bucket (Tokyo region)

1- Login to your AWS Management Console, select services, and then select S3 under storage.

aws services list

2- Click the Create Bucket button.

create amazon s3 bucket

3- Enter a Bucket name (tokyobucket22) and then select Region.

s3 create bucket general configuration

4- Uptick Block all public access checkbox.

bucket settings for block access

5- Bucket versioning select enable.

bucket versioning enable

6- Under advanced settings Object Lock section. If you want to lock object then you can select the enable option and then click create bucket.

s3 bucket advanced settings object

The AWS S3 bucket (Tokyo region) has been created successfully.

Create an S3 Bucket (Ohio region)

1- Click on the create bucket to create a bucket in other region (Ohio).

create amazon s3 bucket

2- Bucket name (ohiobucket222), select region (Ohio).

s3 create bucket general configuration

3- Uptick Block all public access checkbox.

bucket settings for block access

4- Bucket Versioning select enable.

bucket versioning enable

5- Advanced settings, under object lock select (enable/disable) and then click create bucket.

s3 bucket advanced settings object

6- Buckets has been created successfully (1 in Tokyo and 1 in Ohio Region).

create amazon s3 bucket

Adding Replication Rule

Add replication rule when the destination S3 bucket is in a different AWS account

1- In the Bucket name list, select the name of the bucket (tokyobucket22) that you want.

create amazon s3 bucket

2- Select Management

amazon s3 bucket overview

3- Select Replication, and then select Add rule.

amazon s3 bucket management

4- In the Replication rule wizard, under Set source page, entire bucket, and then click Save.

s3 bucket replication rule resource

5- In the Set destination page, under Destination bucket.
Under storage, class select standard and then click next.

s3 bucket replication rule destination

6- In the configure rule option, select Create a new role under IAM rule.
Under rule name type a rule name (Rep-Tokyo-Ohio).
Select enable under status and then click next.

s3 bucket replication new rule

7- Review your replication rule and then click save.

s3 bucket replication rule review

8- Replication configuration updated successfully.

s3 bucket management

How to upload files/folders to an S3 Bucket

This guide will explains how to upload files into an S3 bucket.

To upload files to an S3 bucket

1- Select your S3 bucket (tokyobucket22) the name of the bucket that you want to upload your files to.

create s3 bucket

2- Select Upload.

upload files s3 bucket

3- In the Upload dialog box, select Add files.

upload files s3 bucket

4- Select files to upload, and then select Open.

windows explorer

5- Click next.

upload files s3 bucket

6- Click on next button, to set permissions or properties for the files that you are uploading.

upload files s3 bucket user

7- Select storage class and then click next.

upload files s3 bucket storage

8- Select upload

upload files s3 bucket review

9- One text file is successfully uploaded to our (tokyobucket22) bucket, click Amazon S3.

upload files s3 bucket

10- Select other region bucket (ohiobucket222).

create s3 bucket

11- Now you can see our text file.

upload files s3 bucket

To upload files to an S3 bucket other region

1- Select your S3 bucket (ohiobucket222) the name of the bucket that you want to upload your files to. Select Upload.

upload files s3 bucket

2- In the Upload dialog box, select Add files.

upload files s3 bucket-

3- Select files to upload, and then select Open. Click next.

upload files s3 bucket

4- Select next, to “Set permissions or properties” for the files that you are uploading, choose next.

upload files s3 bucket user

5- Select storage class and then click next.

upload files s3 bucket storage

6- Select upload.

upload files s3 bucket review

7- One text file is successfully uploaded to our (ohiobucket222) bucket, click Amazon S3.

upload files s3 bucket

8- Select the bucket (tokyobucket22), to check the files is uploaded on other bucket.

create s3 bucket

9- Now you can’t see the files on (tokyobuket22) bucket.

upload files s3 bucket

Jamil Parvez

Jamil Pervez works as a Network Administrator, based in Kuwait with a Primary focus on Microsoft technologies. Microsoft Certified MCSE, MCTP, MCITP, CCNP, CCIP, CCVP with 20 years of experience in administering Windows Servers, Exchange, VMWare, Veeam B&R, Veritas BackupExec.

Related Articles

Leave a Reply

Back to top button