[Recipes] Amazon S3 Cross-Region Replication Lab

Problem: 

Need to experiment and learn S3 cross-region replication.

Solution Summary: 

We will create two buckets and demonstrate cross-region replication.

Prerequisites: 

Have done basic operations with S3.

Solution Steps: 

  1. Create two buckets with default settings, but belonging to different regions. I will use btbucket1 and btbucket2

  2. Click on bucket 1, go to properties.

  3. Under Advanced Settings, go to Cross-region replication.

    1. It shows a message that: To use cross-region replication, you must enable versioning on this bucket and on the target bucket.

  4. Click on versioning (under properties tab itself) and enable versioning.

  5. Go to cross-region replication (under properties tab itself) and click enable:

    1. Provide destination region and bucket.

    2. Under Source, select whole bucket, alternate option is ‘Prefix within this bucket’.

    3. Select Destination storage class as Standard-IA.

    4. Select ‘Create new role’ option under Select Role.

  6. If you click save now, you will get the error message: Destination bucket must have versioning enabled.

  7. Go back to bucket2, enable versioning and follow steps 4 and 5 with one exception: the role should have been already created.

  8. Once you click save, you should see no errors.

  9. Upload a file into bucket1.

  10. You should see the file in bucket 2 (it may take some time).

 

Important Notes (Exam Tips)

  1. If you are doing cross-region replication on an existing bucket, the objects that are already there will not be replicated. However, once you replicate a file version, all its previous versions and permissions will also be replicated.

  2. Deleting a file in bucket will delete in the replication bucket. Delete markers are replicated. However, Undo Delete is not replicated.

  3. Regions must be unique: cannot use cross-region replication to replicate within same region.

  4. Cannot replicate to more than one destination.

Recipe Tags: 

Comments

lijo's picture

Replication-is-under-Management-tab-now.

Learn Serverless from Serverless Programming Cookbook

Contact

Please first use the contact form or facebook page messaging to connect.

Offline Contact
We currently connect locally for discussions and sessions at Bangalore, India. Please follow us on our facebook page for details.
WhatsApp (Primary): (+91) 7411174113
Phone (Escalations): (+91) 7411174114

Business newsletter

Complete the form below, and we'll send you an e-mail every now and again with all the latest news.

About

CloudMaterials is my blog to share notes and learning materials on Cloud and Data Analytics. My current focus is on Microsoft Azure and Amazon Web Services (AWS).

I like to write and I try to document what I learn to share with others. I believe that knowledge is useless unless you share it; the more you share, the more you learn.

Recent comments

Photo Stream