| by Arround The Web | No comments

How to Configure AWS S3 Bucket Cross-Region Data Replication?

AWS is a platform that is used by different users for data storage on the cloud. AWS is not only storing the data but can provide security to data, analysing the data, alerting the user on malicious activity, cost optimization, and much more. Today, AWS has become the centre of attention for tech. enthusiasts as it is a platform for a vast portfolio of services.

This article provides a practical demonstration of configuring AWS S3 bucket cross-data replication.

How to Configure AWS S3 Bucket Cross-Region Data Replication?

S3 bucket allows its users to have access to the contents inside a bucket within a region or across the region. Similarly, we can also access the objects of a specific bucket across the accounts. Replication is the process in which the content present inside one bucket will automatically be duplicated into another bucket due to the configured replication policy.

To configure AWS S3 bucket cross-region data replication, follow the below-mentioned steps:

Let’s explore the steps for configuring the replication job in the S3 bucket:

Step 1: Create a Source Bucket with Versioning

On the AWS Management Console, search and select the “S3” bucket service:

Click on the “Create bucket” button on the S3 Dashboard:

Provide the name for the bucket in the field as highlighted in the below-attached image:

Disable the “Block all public access” option and check the “Acknowledgment” option at the bottom to enable the public access:

In the “Bucket Versioning” section, enable the versioning for the replication job. Click on the “Create Bucket” button at the bottom of the interface afterward:

Learn more about versioning by referring to this article: “How to Configure AWS S3 Bucket Versioning?

Now, we will upload some content to the S3 bucket. For this purpose, you can refer to this step-by-step guide for uploading objects to the S3 bucket: “How to Upload Objects in Amazon Simple Storage Service?:

Step 2: Create a Destination Bucket with Versioning and Different Region

Now we will create another bucket to implement Cross Region Replication. Click on the “Create Bucket” button on the Dashboard by following step 1. After that, provide a unique identifier for the bucket but we will select a different region for the Cross Region Replication job now:

Scroll down the interface and disable the “Block all the public access” option. Then click on the “Acknowledgement” option:

Similarly, like we have configured earlier the versioning on the bucket, enable the bucket versioning by selecting the “Enable” option under the “Bucket Versioning” section:

By keeping the rest of the settings as default, click on the “Create Bucket” button at the bottom of the interface.

Step 3: Configure Replication Policy

To configure the Cross Region Replication for the S3 bucket, we will first configure a “Replica Policy” for the S3 bucket. For this purpose, select the first bucket that you created earlier:

After selecting the bucket, click on the “Management” tab:

In the “Management” tab’s interface, scroll down and click on the “Create replication rule” button:

Provide a unique name for your replica policy:

In the “Source bucket” section, enable the “Apply to all objects in the bucket” option:

In the “Destination” section, AWS provides us with two options i.e., configure the replication job within or across the account. Both source and destination buckets are in the same account, therefore, we will select the “Choose a bucket in this account” option. After that click on the “Browse S3” button to choose the other bucket:

Select the second bucket we have created and then click on the “Choose path” button:

We can also configure the IAM role. Here, we have kept the settings unchanged and selected the “Create new role” option:

You can also change your encryption settings or storage class. By checking this option, AWS will display various options to you for storage class:

Keeping the rest of the settings as default, proceed to save the changes by clicking on the “Save” button:

From the Dialogue box, we have selected the first option and then click on the “Submit” option:

Step 4: Verification

Now we will verify if the replication job has been successfully operating or not. For this purpose, click on the source bucket (the first bucket we have created) from the S3 dashboard:

Here, we have uploaded a text document to our source bucket. We will modify the text document and upload it again:

We have modified our text document. Click on the “Upload” button on the interface to proceed further with uploading the document to the source bucket:

We have selected and uploaded the file to the source bucket. After selecting the file, click on the “Upload” bucket at the bottom of the interface:

Go to your S3 bucket dashboard and select the destination bucket (the second bucket we have created):

AWS will automatically replicate the object here from the source bucket. Hence, the Cross Region Replication policy and job have been configured successfully:

That is all from this guide.

Conclusion

To configure cross-region replication in the S3 bucket create a source and destination bucket and then configure a replication policy from the Management tab of the source bucket. By configuring a replication policy for the S3 bucket, your content continues to be updated and replicated in the configured buckets which in turn provides security and backup to data. This article is an extensive guide for configuring replication jobs for S3 buckets.

Share Button

Source: linuxhint.com

Leave a Reply