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.
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.
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.
C. Configure the rule options.
In this create an IAM role for the bucket replication. I created new rule for replication.
D. Review.
you can review your setting done for cross region replication. Press save button.
5. You see in tab MANAGEMENT TAB –> REPLICATION. That one rule is added as shown below:
6. Go back to Amazon S3 bucket window. You will find the new bucket created for CROSS REGION REPLICATION.
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.