Cross Region Replication in S3 service of AWS

Cross Region Replication in S3 service of AWS

Cross Region Replication is replicate S3 bucket objects from one region to another region of same account or different root account. For make data available to local users or disaster recovery depend upon your need.

Requirement
Versioning must be enabled on both the source and destination buckets.
Region must be unique.

Note:
1. If bucket has already objects present in it before the replication is established. these objects manually replicate to other region.
2. Cross Region Replication doesn’t replicate existing object already present in bucket automatically.
3. Cross Region replication does not support delete markers command means not replicate the delete command. If you delete object is deleted in original bucket region then it not delete from other region bucket.
4. All subsequently updated files will be replicated automatically.
5. Deleted versions will not be replicated. If you delete any version it also not replicated.
6. If you change permission of primary bucket file, its replicated to secondary bucket file which is replicated but vice versa is not possible.
7. You upload file in secondary bucket but it not replicated in primary bucket.

Following is the example of configure the S3 Cross Region Replication

1. Login with AWS console and go to S3 Service of AWS.

2. Select the bucket which need to implement cross region replication.

3. Select the MANAGEMENT TAB –> REPLICATION –> ADD RULE.
Note: Bucket select should have versioning enabled.

Replication S3

4. A pop-up window will open to set the rule for Cross Region Replication as:

A. Set the Source.
Choose the entire bucket or prefix as you need.

Replication rule set source

B. Set the Destination.
Choose the destination bucket with in account or other AWS account.
–Enter Name of new bucket if you created new one.
–Choose the region of new bucket.

Destination replication rule

C. Configure the rule options.
In this create an IAM role for the bucket replication. I created new rule for replication.

Configure rule

D. Review.
you can review your setting done for cross region replication. Press save button.

Review crossregion replication

5. You see in tab MANAGEMENT TAB –> REPLICATION. That one rule is added as shown below:

Replication rule created

6. Go back to Amazon S3 bucket window. You will find the new bucket created for CROSS REGION REPLICATION.

S3 bucket

7. You can see existing files are not moved. you upload the new file will be replicated. For moving existing files you need to upload again.
Note:
1. If you change permission of primary bucket , its replicated to secondary bucket. vice versa is not possible.
2. You upload file in secondary bucket but it not replicated in primary bucket.

Delete the replication rule
Go to MANAGEMENT –> REPLICATION –> Select the rule from list –> DELETE the rule.

Delete replication

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.