How To Configure Cross Region Replication for an S3 Bucket

Lab-How-To-Configure-Cross-Region-Replication-for-an-S3-Bucket

1. Create an S3 bucket

Type S3 in AWS Console and click

Set Primary Bucket’s Region as Singapore

select Create bucket.

Write bucket name as Unique Nam…


This content originally appeared on DEV Community and was authored by Thu Kha Kyawe

Lab-How-To-Configure-Cross-Region-Replication-for-an-S3-Bucket

1. Create an S3 bucket

  • Type S3 in AWS Console and click

  • Set Primary Bucket's Region as Singapore

  • select Create bucket.

  • Write bucket name as Unique Name

  • Click enable

  • Click Create bucket

  • Change Region for Backup Bucket

  • select Create bucket.

  • Write bucket name as Unique Name

  • Click enable

  • Click Create bucket

2. Configure Cross-Region Replication

  • Click Primary Bucket

  • Click Managment

  • Click Create replication rule

  • Write rule name

  • Select Apply to all objects in the bucket

  • Choose backup-bucket

  • Choose Create new role

[!NOTE]
You can create policy and rule by yourself too. If you want, please do the following until created policy and rule:

3. Create Policy and Rule at IAM

  • Type IAM in AWS Console and open as new tab

  • Click Policies

  • Click Create policy

  • Click json and delete default policy

  • Copy and paste the following policy, edit with your bucket arn and click Next
{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Action": [
                "s3:ListBucket",
                "s3:GetReplicationConfiguration",
                "s3:GetObjectVersionForReplication",
                "s3:GetObjectVersionAcl",
                "s3:GetObjectVersionTagging",
                "s3:GetObjectRetention",
                "s3:GetObjectLegalHold"
            ],
            "Effect": "Allow",
            "Resource": [
                "arn:aws:s3:::primary-bucket-23042024",
                "arn:aws:s3:::primary-bucket-23042024/*",
                "arn:aws:s3:::backup-bucket-23042024",
                "arn:aws:s3:::backup-bucket-23042024/*"
            ]
        },
        {
            "Action": [
                "s3:ReplicateObject",
                "s3:ReplicateDelete",
                "s3:ReplicateTags",
                "s3:ObjectOwnerOverrideToBucketOwner"
            ],
            "Effect": "Allow",
            "Resource": [
                "arn:aws:s3:::primary-bucket-23042024/*",
                "arn:aws:s3:::backup-bucket-23042024/*"
            ]
        }
    ]
}

  • Write policy name and Click Create Policy

  • Click Roles

  • Click Create role

  • Choose S3 and Click Next

  • Choose TKK-S3-Cross-Region-Replication-Rule and Click Next

  • Write TKK-S3-Cross-Region-Replication-Rule and Click Create role

  • Go back to previous tab and choose TKK-S3-Cross-Region-Replication-Rule

  • Select Change the storage class for the replicated objects and then in Storage class, select Standard-IA.

  • Click Save

  • Click No, do not replicate existing objects. and then Click Submit

  • Select primary-bucket-23042024, and then select Upload.

  • Click Add files

  • select any file on your local computer, and click Open and then click Upload

  • Click Close

  • On the Buckets page, select backup-bucket-23042024 to view the file you just uploaded.

Congratulations, you have completed Lab-How To Configure Cross-Region Replication for an S3 Bucket

Repository: AWS Learning Labs


This content originally appeared on DEV Community and was authored by Thu Kha Kyawe


Print Share Comment Cite Upload Translate Updates
APA

Thu Kha Kyawe | Sciencx (2025-11-07T14:46:36+00:00) How To Configure Cross Region Replication for an S3 Bucket. Retrieved from https://www.scien.cx/2025/11/07/how-to-configure-cross-region-replication-for-an-s3-bucket-2/

MLA
" » How To Configure Cross Region Replication for an S3 Bucket." Thu Kha Kyawe | Sciencx - Friday November 7, 2025, https://www.scien.cx/2025/11/07/how-to-configure-cross-region-replication-for-an-s3-bucket-2/
HARVARD
Thu Kha Kyawe | Sciencx Friday November 7, 2025 » How To Configure Cross Region Replication for an S3 Bucket., viewed ,<https://www.scien.cx/2025/11/07/how-to-configure-cross-region-replication-for-an-s3-bucket-2/>
VANCOUVER
Thu Kha Kyawe | Sciencx - » How To Configure Cross Region Replication for an S3 Bucket. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2025/11/07/how-to-configure-cross-region-replication-for-an-s3-bucket-2/
CHICAGO
" » How To Configure Cross Region Replication for an S3 Bucket." Thu Kha Kyawe | Sciencx - Accessed . https://www.scien.cx/2025/11/07/how-to-configure-cross-region-replication-for-an-s3-bucket-2/
IEEE
" » How To Configure Cross Region Replication for an S3 Bucket." Thu Kha Kyawe | Sciencx [Online]. Available: https://www.scien.cx/2025/11/07/how-to-configure-cross-region-replication-for-an-s3-bucket-2/. [Accessed: ]
rf:citation
» How To Configure Cross Region Replication for an S3 Bucket | Thu Kha Kyawe | Sciencx | https://www.scien.cx/2025/11/07/how-to-configure-cross-region-replication-for-an-s3-bucket-2/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.