This article aims to provide you with a comprehensive step-by-step guide to help you set up Cross-Region Replication in S3 and seamlessly replicate your data across buckets in a diverse set of regions. Please note that this replication can incur extra charges from AWS.
You can implement Cross-Region Replication in S3 using the following steps:
To start replicating data from your desired S3 bucket, you first need to log into the AWS management console for S3.
Once you’ve logged in, search for "S3" in the search bar. The S3 home page will open up on your screen.
Click on the "Create a Bucket" option at the top right corner of your screen.
Provide a unique name for the bucket, and select any region except the region where your Atlan bucket is deployed. (In this example, we've selected "us-east-1" since the Atlan bucket is in the "ap-south-1" region.)
Enable versioning and server-side encryption.
Add tags, if required.
Once the destination bucket is created successfully, it's time to create the IAM role that will be used for replication.
Search for "IAM" in the search bar, and click on "IAM".
Once the IAM homepage is open on your screen, click on "Role" in the side section.
Click on "Create Role".
In the next screen, click on "S3" and then "Next:Permissions".
In the next screen, search for "S3" and select the "AmazonS3FullAccess" managed policy. Then click on "Next: Tags".
Provide any tags, if required, and then click on "Next: Review".
Provide a name for the role and add a description, then click on "Create Role".
Once we have our destination bucket and role ready, we can move on to enabling Cross-Region Replication for the Atlan S3 bucket.
Go to the S3 homepage, and select the Atlan S3 bucket.
Switch to the Management tab, and click on "Create Replication Rule".
Click on "Enable Bucket Versioning", and provide a name for the replication rule.
Select "This rule applies to all objects in bucket" under the "Choose a rule scope" section.
Under the "Destination" section, provide the name of the S3 bucket that you created in Step 1.
Search and select the IAM role that you created in Step 2.
Leave the other settings as default, and click on "Save".
Now you have Cross-Region Replication enabled for your Atlan bucket! This will be helpful for recovery in case of region or Availability Zone (AZ) failure.