Lab complete!
Now that you have completed this lab, make sure to update your Well-Architected review if you have implemented these changes in your workload.
Click here to access the Well-Architected Tool
Amazon S3 replication enables automatic, asynchronous copying of objects across Amazon S3 buckets. Buckets that are configured for object replication can be owned by the same AWS account or by different accounts. You can copy objects between different AWS Regions or within the same Region. You will setup bi-directional replication between S3 buckets in two different regions, owned by the same AWS account.
Replication is configured via rules. There is no rule for bi-directional replication. You will however setup a rule to replicate from the S3 bucket in the east AWS region to the west bucket, and you will setup a second rule to replicate going the opposite direction. These two rules will enable bi-directional replication across AWS regions.
Go to the Amazon S3 console
Click on the name of the east bucket
<your_naming_prefix>-crrlab-us-east-2
Click on the Management tab (Step A in screenshot)
Click Create replication rule (Step B in screenshot)
For Replication rule name enter east to west
Leave Status set to enabled
For Choose a rule scope select Apply to all objects in the bucket
For Destination leave Choose a bucket in this account selected, click Browse S3 and select the name of the west bucket from the drop-down
<your_naming_prefix>-crrlab-us-west-2
For IAM Role leave Choose from existing IAM roles selected, and select <your-naming-prefix>-S3-Replication-Role-us-east-2 from the search results box
For Encryption, select Replicate objects encrypted with AWS KMS and leave AWS managed key (aws/s3) selected.
Click Save
The screen will ask Replicate existing objects?, leave No, do not replicate existing objects selected and click Submit
The screen should now display Replication Rules with the Replication Rule Name, Status, Destination bucket and Region, and other configuration of your replication rule
To test this rule you will upload an object into the east bucket and observe that it is replicated into the west bucket. For this step you will need a test object:
Right-click and Save image as…
Go to the Amazon S3 console, or if you are already there click on Amazon S3 in the upper left corner
Click on the name of the east bucket
<your_naming_prefix>-crrlab-us-east-2
Click on ⬆ Upload
Upload the file you will use as an object
When the file is finished uploading, click on the filename
At the top of the console click on Amazon S3 and then click on the name of the west bucket
<your_naming_prefix>-crrlab-us-west-2
Click on the filename of the file that you just uploaded to the other bucket (yes, it is here now too!)
Note the following in from the object details:
After setting up the second rule, you will have completed configuration of bi-directional replication between our two Amazon S3 buckets.
<your_naming_prefix>-crrlab-us-west-2
west to east
<your_naming_prefix>-crrlab-us-east-2
The screen will ask Replicate existing objects?, leave No, do not replicate existing objects selected and click Submit
The screen should say Replication configuration successfully updated. and display the Source, Destination, and Permissions of your replication rule (you may need to refresh)
Now that you have completed this lab, make sure to update your Well-Architected review if you have implemented these changes in your workload.
Click here to access the Well-Architected Tool