> ## Documentation Index
> Fetch the complete documentation index at: https://cloud-architect.ipoint-labs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Setup Cross Region Replication and Versioning in S3

> Hands-on lab · 45m

Launch this lab in the IP Lab Portal, then follow the steps below in the AWS console.

<a className="ip-lab-portal-btn" href="https://labs.intellectualpoint.com/labs/setup-cross-region-replication-and-versioning-in-s3" target="_blank" rel="noreferrer">
  Open IP Lab Portal
</a>

## Overview

### Lab Details

1. This tutorial guides you on how to enable cross-region replication and versioning in Amazon S3. The steps involve working with an S3 Bucket to accomplish this.
2. Duration: **45 minutes**
3. AWS Region: **US East (N. Virginia) us-east-1 , Asia Pacific (Mumbai) ap-south-1**

### Architecture Diagram

<img src="https://mintcdn.com/ip-cloud-architect-pathway/661uoCRNYJkWyoF5/images/labs/setup-cross-region-replication-and-versioning-in-s3/001.png?fit=max&auto=format&n=661uoCRNYJkWyoF5&q=85&s=e126b5f6dcb2ca75dda7382bb7c46fda" alt="" width="1260" height="1040" data-path="images/labs/setup-cross-region-replication-and-versioning-in-s3/001.png" />

### Task Details

1. Sign in to AWS Management Console.
2. Create an S3 Source Bucket.
3. Create an S3 Target Bucket.
4. Enable Cross Region Replication and add rule for source bucket.

### Launching Lab Environment

1. To launch the lab environment, Click on the **Start Lab** button.
2. Please wait until the cloud environment is provisioned. It will take less than a minute to provision.
3. Once the Lab is started, you will be provided with **IAM user name**, **Password**, **Access** **Key**, and **Secret** **Access** **Key**.

> **Note** : You can only start one lab at any given time

## Lab guide

### Lab Steps

#### Task 1: Sign in to AWS Management Console

1. Click on the **Open Console** button, and you will get redirected to AWS Console in a new browser tab.
2. On the AWS sign-in page,

   * Leave the Account ID as default. Never edit/remove the 12 digit Account ID present in the AWS Console. otherwise, you cannot proceed with the lab.
   * Now copy your **User Name** and **Password** in the Lab Console to the **IAM Username and Password** in AWS Console and click on the **Sign in** button.
3. Once Signed In to the AWS Management Console, Make the default AWS Region as **US East (N. Virginia) us-east-1.**

#### Task 2: Creating an S3 Source Bucket

In this task, we are going to create an S3 source bucket with the required configurations like name, region, access, and versioning.

1. Make sure you are in the **US East** (**N.Virginia) us-east-1** Region.
2. Navigate to the **Services** menu at the top. Click on **S3** in the **Storage** section.
3. In the S3 dashboard, click on the **Create bucket** button and fill in the bucket details.
4. In the General Configuration, Bucket name: Enter ***whizsource1*** **(Source bucket)**

   * **Note:** S3 Bucket names are globally unique, choose a name that is available. Maybe you can enter your name and create one.
5. Region: Select **US East (N. Virginia) us-east-1**

<img src="https://mintcdn.com/ip-cloud-architect-pathway/661uoCRNYJkWyoF5/images/labs/setup-cross-region-replication-and-versioning-in-s3/002.png?fit=max&auto=format&n=661uoCRNYJkWyoF5&q=85&s=c84533f9a2235f1fa5ae91a429b2a209" alt="" width="2084" height="1016" data-path="images/labs/setup-cross-region-replication-and-versioning-in-s3/002.png" />

6. Object ownership: Select **ACLs disabled (recommended)** option

7. In the option of **Bucket settings for Block Public Access**, **Uncheck** the option of **Block all public access**. And, Acknowledge the same by checking the below option

<img src="https://mintcdn.com/ip-cloud-architect-pathway/661uoCRNYJkWyoF5/images/labs/setup-cross-region-replication-and-versioning-in-s3/003.png?fit=max&auto=format&n=661uoCRNYJkWyoF5&q=85&s=c2afb1b46d683387f7370335f5d8511c" alt="" width="1620" height="1388" data-path="images/labs/setup-cross-region-replication-and-versioning-in-s3/003.png" />

8. In the Option of **Bucket Versioning,** Check the option of **Enable.**

<img src="https://mintcdn.com/ip-cloud-architect-pathway/661uoCRNYJkWyoF5/images/labs/setup-cross-region-replication-and-versioning-in-s3/004.png?fit=max&auto=format&n=661uoCRNYJkWyoF5&q=85&s=fdd8764d0a346e8792788c40140697dc" alt="" width="1618" height="464" data-path="images/labs/setup-cross-region-replication-and-versioning-in-s3/004.png" />

9. Keep everything default and click on **Create bucket** button.

10. **Source bucket** is created now, Let's create the **target bucket**.

#### Task 3: Creating an S3 Target Bucket

In this task, we are going to create an S3 target bucket with the required configurations like name, region, access, and versioning

1. In the S3 dashboard, click on the **Create bucket** button and fill in the bucket details.
2. In the General Configuration, Bucket name: Enter ***whiztarget1*** **(Target bucket)**

   * **Note:** S3 Bucket names are globally unique, choose a name that is available.
3. Region: From the drop down please Select **Asia Pacific (Mumbai) ap-south-1**

<img src="https://mintcdn.com/ip-cloud-architect-pathway/4J_NjyMeVcLG0gf_/images/labs/encrypt-s3-bucket-ebs-volume-and-ami-using-aws-kms-2/011.png?fit=max&auto=format&n=4J_NjyMeVcLG0gf_&q=85&s=e232eaec785c1b703544f535ea88fdb6" alt="" width="2120" height="816" data-path="images/labs/encrypt-s3-bucket-ebs-volume-and-ami-using-aws-kms-2/011.png" />

4. Object ownership: Select **ACLs disabled (recommended)** option

5. In the option of **Bucket settings for Block Public Access**, **Uncheck** the option of **Block all public access**. And, Acknowledge the same by checking the below option.

<img src="https://mintcdn.com/ip-cloud-architect-pathway/661uoCRNYJkWyoF5/images/labs/setup-cross-region-replication-and-versioning-in-s3/003.png?fit=max&auto=format&n=661uoCRNYJkWyoF5&q=85&s=c2afb1b46d683387f7370335f5d8511c" alt="" width="1620" height="1388" data-path="images/labs/setup-cross-region-replication-and-versioning-in-s3/003.png" />

6. In the Option of **Bucket Versioning,** Check the option of **Enable.**

<img src="https://mintcdn.com/ip-cloud-architect-pathway/4J_NjyMeVcLG0gf_/images/labs/encrypt-s3-bucket-ebs-volume-and-ami-using-aws-kms-2/012.png?fit=max&auto=format&n=4J_NjyMeVcLG0gf_&q=85&s=e9ee2ae2e6f37097aca278cec2dde1c1" alt="" width="1618" height="464" data-path="images/labs/encrypt-s3-bucket-ebs-volume-and-ami-using-aws-kms-2/012.png" />

7. Keep everything default and click on **Create bucket** button.
8. Both the **Source** and **Target** Buckets are created successfully.

#### Task 4: Enable Replication in Source Bucket and add a rule

In this task, we are going to create a replication rule for the source bucket and will specify the destination bucket.

1. Now go to **Source Bucket** and click on **Management.** Scroll down and select **Create replication rule** button.
2. Enter a rule name of your choice and keep the status as **Enabled**.

<img src="https://mintcdn.com/ip-cloud-architect-pathway/661uoCRNYJkWyoF5/images/labs/setup-cross-region-replication-and-versioning-in-s3/005.png?fit=max&auto=format&n=661uoCRNYJkWyoF5&q=85&s=6548b506a1807867e4af8b9a102f1c54" alt="" width="800" height="367" data-path="images/labs/setup-cross-region-replication-and-versioning-in-s3/005.png" />

3. Choose a rule scope : Select **Apply to all objects in the bucket**

   <img src="https://mintcdn.com/ip-cloud-architect-pathway/661uoCRNYJkWyoF5/images/labs/setup-cross-region-replication-and-versioning-in-s3/006.png?fit=max&auto=format&n=661uoCRNYJkWyoF5&q=85&s=3fb520b9a4c30e63b81e8e90e3f74427" alt="" width="541" height="114" data-path="images/labs/setup-cross-region-replication-and-versioning-in-s3/006.png" />
4. Under Destination, select **choose a bucket in this account**.

   <img src="https://mintcdn.com/ip-cloud-architect-pathway/4J_NjyMeVcLG0gf_/images/labs/encrypt-s3-bucket-ebs-volume-and-ami-using-aws-kms-2/014.png?fit=max&auto=format&n=4J_NjyMeVcLG0gf_&q=85&s=eae50becc9dc5a149edc3990da056806" alt="" width="1596" height="806" data-path="images/labs/encrypt-s3-bucket-ebs-volume-and-ami-using-aws-kms-2/014.png" />
5. In the search option enter the **Mumbai region bucket name**, don't choose by browse the S3 option.

<img src="https://mintcdn.com/ip-cloud-architect-pathway/661uoCRNYJkWyoF5/images/labs/setup-cross-region-replication-and-versioning-in-s3/007.png?fit=max&auto=format&n=661uoCRNYJkWyoF5&q=85&s=fecaef034ce313d5cfecbeb5fa10e823" alt="" width="1067" height="53" data-path="images/labs/setup-cross-region-replication-and-versioning-in-s3/007.png" />

6. Under IAM Role, Select Choose from existing IAM roles\*\*,\*\* and select **whiz\_s3\_role\<random.numbers>**

<img src="https://mintcdn.com/ip-cloud-architect-pathway/661uoCRNYJkWyoF5/images/labs/setup-cross-region-replication-and-versioning-in-s3/008.png?fit=max&auto=format&n=661uoCRNYJkWyoF5&q=85&s=b2ae0f3d5a1e7205e31845eff8e97aeb" alt="" width="1420" height="297" data-path="images/labs/setup-cross-region-replication-and-versioning-in-s3/008.png" />

7. Under the Destination Storage Class, select **Change the storage class for the replicated objects** and choose **One Zone-IA**.

<img src="https://mintcdn.com/ip-cloud-architect-pathway/FRiGG55B6IHppawE/images/labs/setup-cross-region-replication-and-versioning-in-s3/009.png?fit=max&auto=format&n=FRiGG55B6IHppawE&q=85&s=88736201ef772b5ab2b64b4da683f304" alt="" width="798" height="522" data-path="images/labs/setup-cross-region-replication-and-versioning-in-s3/009.png" />

8. Leave everything as default. Review once and click on **Save** button. One Pop-up appears Select **No, do not replicate existing objects** and Click on **Submit** button.

<img src="https://mintcdn.com/ip-cloud-architect-pathway/FRiGG55B6IHppawE/images/labs/setup-cross-region-replication-and-versioning-in-s3/010.png?fit=max&auto=format&n=FRiGG55B6IHppawE&q=85&s=a60ed76e545bed4a690713c2f6bf9f17" alt="" width="1258" height="566" data-path="images/labs/setup-cross-region-replication-and-versioning-in-s3/010.png" />

9. Now navigate to the source bucket and upload an Object(.txt or .png) in the **Source bucket** by clicking on Add Files. Click on **Upload**.

10. Click on the **Add files** button and upload any object from your local machine and click on **Upload** button.

11. Navigate to your **Target Bucket** to see the replication. It may take **up to 3-5 minutes** for replication.

<img src="https://mintcdn.com/ip-cloud-architect-pathway/FRiGG55B6IHppawE/images/labs/setup-cross-region-replication-and-versioning-in-s3/011.png?fit=max&auto=format&n=FRiGG55B6IHppawE&q=85&s=266a7051516ee25bb2358f10941d08e6" alt="" width="1077" height="590" data-path="images/labs/setup-cross-region-replication-and-versioning-in-s3/011.png" />

12. Now you have successfully configured the Cross-Region Replication in S3 Bucket. Congratulations!

13. Once the lab steps are completed, please click on the **Validation** button on the left side panel.

> ##### Do you know?
>
> AWS S3 provides the ability to specify a replication time control (RTC) for cross-region replication. RTC allows you to define a service level agreement (SLA) for object replication, specifying the maximum time it should take for an object to be replicated to the destination bucket. This feature helps you ensure timely replication and maintain data consistency across regions.

### Completion and Conclusion

1. You have successfully created the S3 Source Bucket.
2. You have successfully created the S3 Target Bucket.
3. You have successfully Tested Cross-Region Replication Configuration.

### End Lab

1. Sign out of the AWS Account.
2. You have successfully completed the lab.
3. Once you have completed the steps click on **End Lab** from the IP Lab Portal dashboard.

## What gets checked

When you press **Check my work**, the platform verifies each of these:

* **Create Public AWS S3 Bucket** — Check whether a Public S3 Bucket created or not
* **Enable S3 Bucket Versioning** — Check whether S3 Bucket versioning in Enabled or not.
* **check s3 object** — Check whether an object is uploaded to the S3 bucket.
* **Create a S3 Replication rule** — Check whether a S3 replication rule with destination bucket name is created or not.

## Related help

* [FAQs and Troubleshooting](/aws-saa/support/faqs-and-troubleshooting)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.