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:
-
Create two buckets with default settings, but belonging to different regions. I will use btbucket1 and btbucket2
-
Click on bucket 1, go to properties.
-
Under Advanced Settings, go to Cross-region replication.
-
It shows a message that: To use cross-region replication, you must enable versioning on this bucket and on the target bucket.
-
-
Click on versioning (under properties tab itself) and enable versioning.
-
Go to cross-region replication (under properties tab itself) and click enable:
-
Provide destination region and bucket.
-
Under Source, select whole bucket, alternate option is ‘Prefix within this bucket’.
-
Select Destination storage class as Standard-IA.
-
Select ‘Create new role’ option under Select Role.
-
-
If you click save now, you will get the error message: Destination bucket must have versioning enabled.
-
Go back to bucket2, enable versioning and follow steps 4 and 5 with one exception: the role should have been already created.
-
Once you click save, you should see no errors.
-
Upload a file into bucket1.
-
You should see the file in bucket 2 (it may take some time).
Important Notes (Exam Tips)
-
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.
-
Deleting a file in bucket will delete in the replication bucket. Delete markers are replicated. However, Undo Delete is not replicated.
-
Regions must be unique: cannot use cross-region replication to replicate within same region.
-
Cannot replicate to more than one destination.
Comments
Replication-menu-changed
Replication-is-under-Management-tab-now.