{"id":14064,"date":"2016-05-17T19:20:54","date_gmt":"2016-05-17T15:20:54","guid":{"rendered":"http:\/\/www.msp360.com\/blog\/?p=14064"},"modified":"2020-12-18T15:42:09","modified_gmt":"2020-12-18T11:42:09","slug":"how-to-improve-amazon-s3-data-protection-using-cross-region-replication","status":"publish","type":"post","link":"https:\/\/www.msp360.com\/resources\/blog\/how-to-improve-amazon-s3-data-protection-using-cross-region-replication\/","title":{"rendered":"How to Improve Amazon S3 Data Protection Using Cross-Region Replication"},"content":{"rendered":"<p>By default, Amazon S3 stores multiple copies of your data inside different facilities within one AWS Region. In case of region-level disaster like tornado, flood or earthquake all these facilities will experience outage and despite all precautions your crucial data may be lost. Consequences are catastrophic, especially in case of user-generated content that can\u2019t be easily reproduced.<\/p>\n<h2>This article explains how to Configure Cross-Region Replication between buckets in different AWS Regions to achieve region-level data protection.<!--more-->How to Enable Amazon S3 Cross-Region Replication<\/h2>\n<p>Please before enabling cross-region replication, mind that:<\/p>\n<p>1. Cross region replication is not free. You will be billed according to the prices in the selected region<br \/>\n2. Before implementing Cross-Region Replication, make sure files you want to replicate <a href=\"http:\/\/docs.aws.amazon.com\/AmazonS3\/latest\/dev\/crr-what-is-isnot-replicated.html\" rel=\"nofollow\">are allowed by AWS<\/a>.<\/p>\n<p>Login to your AWS console and choose Amazon S3:\u00a0https:\/\/s3.console.aws.amazon.com\/s3\/<\/p>\n<p>Choose the needed bucket and click it<\/p>\n<p>Click properties and enable\u00a0Versioning. Cross-region replications works only with this feature enabled<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-29068\" src=\"https:\/\/www.msp360.com\/resources\/wp-content\/uploads\/2016\/05\/amazon-s3-versioning-bucket.png\" alt=\"\" width=\"578\" height=\"405\" srcset=\"https:\/\/www.msp360.com\/resources\/wp-content\/uploads\/2016\/05\/amazon-s3-versioning-bucket.png 578w, https:\/\/www.msp360.com\/resources\/wp-content\/uploads\/2016\/05\/amazon-s3-versioning-bucket-300x210.png 300w\" sizes=\"auto, (max-width: 578px) 100vw, 578px\" \/><\/p>\n<p>Go to\u00a0Management tab, find Replication in the sub-menu, and click\u00a0Add a Rule.\u00a0This will begin the cross-region replication setup<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-29071\" src=\"https:\/\/www.msp360.com\/resources\/wp-content\/uploads\/2016\/05\/cross-region-replication-in-Amazon-S3-for-bucket-1024x596.png\" alt=\"\" width=\"625\" height=\"364\" srcset=\"https:\/\/www.msp360.com\/resources\/wp-content\/uploads\/2016\/05\/cross-region-replication-in-Amazon-S3-for-bucket-1024x596.png 1024w, https:\/\/www.msp360.com\/resources\/wp-content\/uploads\/2016\/05\/cross-region-replication-in-Amazon-S3-for-bucket-300x175.png 300w, https:\/\/www.msp360.com\/resources\/wp-content\/uploads\/2016\/05\/cross-region-replication-in-Amazon-S3-for-bucket-768x447.png 768w, https:\/\/www.msp360.com\/resources\/wp-content\/uploads\/2016\/05\/cross-region-replication-in-Amazon-S3-for-bucket-624x363.png 624w, https:\/\/www.msp360.com\/resources\/wp-content\/uploads\/2016\/05\/cross-region-replication-in-Amazon-S3-for-bucket.png 1280w\" sizes=\"auto, (max-width: 625px) 100vw, 625px\" \/><\/p>\n<p>Select your source bucket. You can select a bucket, a given prefix or a tag to replicate only the needed parts of data in the bucket<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-29067\" src=\"https:\/\/www.msp360.com\/resources\/wp-content\/uploads\/2016\/05\/amazon-s3-bucket-replication-setup.png\" alt=\"\" width=\"720\" height=\"716\" srcset=\"https:\/\/www.msp360.com\/resources\/wp-content\/uploads\/2016\/05\/amazon-s3-bucket-replication-setup.png 720w, https:\/\/www.msp360.com\/resources\/wp-content\/uploads\/2016\/05\/amazon-s3-bucket-replication-setup-150x150.png 150w, https:\/\/www.msp360.com\/resources\/wp-content\/uploads\/2016\/05\/amazon-s3-bucket-replication-setup-300x298.png 300w, https:\/\/www.msp360.com\/resources\/wp-content\/uploads\/2016\/05\/amazon-s3-bucket-replication-setup-624x621.png 624w, https:\/\/www.msp360.com\/resources\/wp-content\/uploads\/2016\/05\/amazon-s3-bucket-replication-setup-250x250.png 250w\" sizes=\"auto, (max-width: 720px) 100vw, 720px\" \/><\/p>\n<p>You need a bucket in a different region to perform replication. Choose the existing one or create a new one<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-29070\" src=\"https:\/\/www.msp360.com\/resources\/wp-content\/uploads\/2016\/05\/cross-region-replication-in-Amazon-S3-create-new-bucket.png\" alt=\"\" width=\"716\" height=\"716\" srcset=\"https:\/\/www.msp360.com\/resources\/wp-content\/uploads\/2016\/05\/cross-region-replication-in-Amazon-S3-create-new-bucket.png 716w, https:\/\/www.msp360.com\/resources\/wp-content\/uploads\/2016\/05\/cross-region-replication-in-Amazon-S3-create-new-bucket-150x150.png 150w, https:\/\/www.msp360.com\/resources\/wp-content\/uploads\/2016\/05\/cross-region-replication-in-Amazon-S3-create-new-bucket-300x300.png 300w, https:\/\/www.msp360.com\/resources\/wp-content\/uploads\/2016\/05\/cross-region-replication-in-Amazon-S3-create-new-bucket-624x624.png 624w, https:\/\/www.msp360.com\/resources\/wp-content\/uploads\/2016\/05\/cross-region-replication-in-Amazon-S3-create-new-bucket-250x250.png 250w\" sizes=\"auto, (max-width: 716px) 100vw, 716px\" \/>Additionally you can choose\u00a0different storage class for replication. That helps if you want to spend less for additional copies of your files.<\/p>\n<p><span class=\"further-reading \">Further reading<\/span> <a href=\"https:\/\/www.msp360.com\/resources\/blog\/amazon-s3-storage-classes-guide\/\">Amazon S3 Storage Classes Explained<\/a><\/p>\n<p>You need to select or create IAM role, that will allow automatic replication from one bucket to another.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-29069\" src=\"https:\/\/www.msp360.com\/resources\/wp-content\/uploads\/2016\/05\/cross-region-replication-in-Amazon-S3-configure-IAM.png\" alt=\"\" width=\"715\" height=\"716\" srcset=\"https:\/\/www.msp360.com\/resources\/wp-content\/uploads\/2016\/05\/cross-region-replication-in-Amazon-S3-configure-IAM.png 715w, https:\/\/www.msp360.com\/resources\/wp-content\/uploads\/2016\/05\/cross-region-replication-in-Amazon-S3-configure-IAM-150x150.png 150w, https:\/\/www.msp360.com\/resources\/wp-content\/uploads\/2016\/05\/cross-region-replication-in-Amazon-S3-configure-IAM-300x300.png 300w, https:\/\/www.msp360.com\/resources\/wp-content\/uploads\/2016\/05\/cross-region-replication-in-Amazon-S3-configure-IAM-624x625.png 624w, https:\/\/www.msp360.com\/resources\/wp-content\/uploads\/2016\/05\/cross-region-replication-in-Amazon-S3-configure-IAM-250x250.png 250w\" sizes=\"auto, (max-width: 715px) 100vw, 715px\" \/><\/p>\n<p>Here is the basic rule that can be applied:<\/p>\n<pre>{\r\n   \"Version\":\"2012-10-17\",\r\n   \"Statement\":[\r\n      {\r\n         \"Effect\":\"Allow\",\r\n         \"Action\":[\r\n            \"s3:GetReplicationConfiguration\",\r\n            \"s3:ListBucket\"\r\n         ],\r\n         \"Resource\":[\r\n            \"arn:aws:s3:::source-bucket\"\r\n         ]\r\n      },\r\n      {\r\n         \"Effect\":\"Allow\",\r\n         \"Action\":[\r\n            \"s3:GetObjectVersion\",\r\n            \"s3:GetObjectVersionAcl\"\r\n         ],\r\n         \"Resource\":[\r\n            \"arn:aws:s3:::source-bucket\/*\"\r\n         ]\r\n      },\r\n      {\r\n         \"Effect\":\"Allow\",\r\n         \"Action\":[\r\n            \"s3:ReplicateObject\",\r\n            \"s3:ReplicateDelete\"\r\n         ],\r\n         \"Resource\":\"arn:aws:s3:::destination-bucket\/*\"\r\n      }\r\n   ]\r\n}\r\n<\/pre>\n<p>Replication works for objects that are only created after enabling Cross-Region Replication.<\/p>\n<h2>Conclusion<\/h2>\n<p>Enabling Cross-Region replication will improve the protection of your data in case of the disaster that affects the whole region. You can also use replication to minimize latency for accessing objects for users from different AWS region.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>By default, Amazon S3 stores multiple copies of your data inside different facilities within one AWS Region. In case of region-level disaster like tornado, flood or earthquake all these facilities will experience outage and despite all precautions your crucial data may be lost. Consequences are catastrophic, especially in case of user-generated content that can\u2019t be [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[883,877],"tags":[],"class_list":["post-14064","post","type-post","status-publish","format-standard","hentry","category-backup-and-dr-articles","category-blog-articles"],"acf":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.msp360.com\/resources\/wp-json\/wp\/v2\/posts\/14064","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.msp360.com\/resources\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.msp360.com\/resources\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.msp360.com\/resources\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.msp360.com\/resources\/wp-json\/wp\/v2\/comments?post=14064"}],"version-history":[{"count":0,"href":"https:\/\/www.msp360.com\/resources\/wp-json\/wp\/v2\/posts\/14064\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.msp360.com\/resources\/wp-json\/wp\/v2\/media?parent=14064"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.msp360.com\/resources\/wp-json\/wp\/v2\/categories?post=14064"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.msp360.com\/resources\/wp-json\/wp\/v2\/tags?post=14064"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}