Skip to main content
The 2024 Developer Survey results are live! See the results
391

Always-on access for your data in Amazon S3, using cross-Region replication and Multi-Region Access Points (MRAP)

Created
Active
Last edited
Viewed 940 times
1 min read
Part of AWS Collective
6

To improve durability of your data in the cloud, you should replicate it to multiple locations. For data in Amazon S3, it is automatically stored across multiple devices spanning a minimum of three Availability Zones, giving you 11 9s of durability. For extra durability protection, you can also choose to replicate this data across AWS Regions. But durability is just one part of resilience -- you also need to be able to access that data when you need it. Here I will show you how to ensure your data is both durable by using multiple AWS Regions.

Using Amazon S3 cross-Region replication puts your data into two (or more) S3 buckets in two different AWS Regions.

enter image description here

If you want to create a single access point that will choose the closest available bucket, and enable you to implement failover, then you want to use Multi-Region Access Points (MRAP).

MRAP makes use of AWS Global Accelerator and puts requests to retrieve objects from the bucket onto the AWS backbone network at the closest edge location to where the request was made. This provides faster, more reliable connection to the bucket. When you have configured MRAP in an active/active configuration, then using Global Accelerator it will choose the closest available bucket. If for any reason, a bucket is not available, it will serve the request from the other bucket providing automatic failover.

You can also configure it in an active/passive configuration, always serving from one bucket you designate as active, as shown by the Routing status below, until you initiate a failover.Multi-Region Access Point Failover Configuration

Failover controls like this actually allow you to have multiple active buckets, for example two active and one passive (17 max buckets) if you need it.

From the MRAP page on AWS console it even shows you a graphical representation of your replication rules, showing the locations (AWS Regions) and directionality that you have set up for replication:

enter image description here

To learn how to do all this, check out this tutorial:

  • Getting started with Amazon S3 Multi-Region Access Points [Tutorial]: This step-by-step tutorial shows you how to how to set up and use Amazon Simple Storage Service (Amazon S3) Multi-Region Access Points and failover controls. You will then be able to access the data in these buckets via a single global endpoint, and test failover between any two active-passive Region pairs