AWS, Cloud Computing

4 Mins Read

A Guide to Replicate Images Across the Region using AWS S3 Bucket

Voiced by Amazon Polly

Introduction

Performance, security, and scalability offered by an object storage service, Amazon Simple Storage Service (Amazon S3), are unrivaled in the industry. Customers of all sizes and sectors can use Amazon S3 to store and preserve any amount of data for several use cases, such as data lakes, websites, mobile applications, backup and restore, archiving, business applications, IoT devices, and big data analytics. Amazon S3 offers management features that let you organize, optimize, and customize data access to meet your business, organizational, and regulatory needs.

Freedom Month Sale — Upgrade Your Skills, Save Big!

  • Up to 80% OFF AWS Courses
  • Up to 30% OFF Microsoft Certs
Act Fast!

What is S3 Cross Region Replication?

The S3 replication type, known as S3 cross-region replication, or CRR, automatically copies an object uploaded to an S3 bucket into a new one in a different region.

1) Objects are duplicated asynchronously and subsequently copied;

2) Objects are typically replicated within 15 minutes, although occasionally, they can take hours.

3) Depending on the need, you can use CRR for disaster recovery to give your users in different regions lesser latency.

Points to be considered for setting up the CRR

  • Only brand-new items are copied by default.
  • The source and destination buckets must both have versioning enabled.
  • Building a role enabling writing from the source bucket to the destination bucket is necessary.
  • Replicating objects to the same account or to a different account’s bucket is possible.
  • With CRR, there are fees such as destination storage costs and interregional data transfer fees, among others. Check the official pricing page for the most recent information.
  • When setting up a replication rule, if you need to replicate an existing item, you can configure it as an add-on.

Steps for setting up Cross Region Replication

  1. Open the S3 service from the AWS Console. Click on Create Bucket.
  2. After clicking on create a bucket, Create two
  3. Let’s retain our source bucket in the Asia Pacific (Mumbai) ap-south 1 area and call it source-original-bucket.
  4. Unblock all public access and click on I acknowledge
  5. Don’t forget to enable versioning for the buckets and save it.

step5

step5b

step5c

6. Now, following the same steps, create a destination bucket: destination-original-bucket with versioning enabled, unblocking the public access and keeping it in the Asia Pacific (Singapore) ap-southeast-1 region.

step6

7. Now click on your source-original-bucket and head over to the management tab:

step7

8. Give your replication rule the name “source-bucket-replication” and then click “Create a replication rule”.

step8

9. Choose the destination bucket as “destination-original-bucket”.

step9

10. You must create an IAM role to replicate objects from the source bucket to the destination bucket. Click “create a new role” to do so.

step10

11. A box will appear asking if you want to duplicate existing objects in the S3 bucket as soon as you click save. But, doing so would result in fees, so we will continue without reproducing already-existing objects and click on submit.

step11

12. After completing this setup, you can see a screen saying, “Replication configuration successfully updated”.

step12

13. Now go to the source bucket: source-original-bucket and upload files.

step13

14. Check to see if the uploaded file has been duplicated to our destination bucket by going to destination-original-bucket. You can see that the target bucket has received a successful copy of the submitted file:

step14

Conclusion

This article taught us how to set up Amazon S3 Bucket’s Cross Region Replication. One bucket was made for the source region and the other for the destination zone. While generating, we turned on versioning for both buckets. The source bucket’s replication rule was then set up. I uploaded a file to the source bucket and verified the CRR by looking for the upload object in the destination bucket.

Freedom Month Sale — Discounts That Set You Free!

  • Up to 80% OFF AWS Courses
  • Up to 30% OFF Microsoft Certs
Act Fast!

About CloudThat

CloudThat is an award-winning company and the first in India to offer cloud training and consulting services worldwide. As a Microsoft Solutions Partner, AWS Advanced Tier Training Partner, and Google Cloud Platform Partner, CloudThat has empowered over 850,000 professionals through 600+ cloud certifications winning global recognition for its training excellence including 20 MCT Trainers in Microsoft’s Global Top 100 and an impressive 12 awards in the last 8 years. CloudThat specializes in Cloud Migration, Data Platforms, DevOps, IoT, and cutting-edge technologies like Gen AI & AI/ML. It has delivered over 500 consulting projects for 250+ organizations in 30+ countries as it continues to empower professionals and enterprises to thrive in the digital-first world.

FAQs

1. Can Cross Region Replication can happen in the same region?

ANS: – No, for CRR, the source bucket and destination bucket must be in separate regions (for the same region, you can use the same region replication or SRR).

2. Can we replicate existing objects in the S3 bucket?

ANS: – Yes, we can by S3 Batch Replication, but it will incur charges.

WRITTEN BY Huda Khan

Huda works as a Frontend Software Developer at CloudThat. She is an accomplished front-end developer passionate about creating user-friendly and aesthetically pleasing websites. Proficient in frameworks like ReactJS and technologies such as HTML, CSS, and JavaScript, Huda specializes in producing responsive and intuitive designs with a thorough understanding of web development fundamentals. In her spare time, she enjoys experimenting with new technologies and staying up to date with the latest advancements in the field.

Share

Comments

    Click to Comment

Get The Most Out Of Us

Our support doesn't end here. We have monthly newsletters, study guides, practice questions, and more to assist you in upgrading your cloud career. Subscribe to get them all!