Replicating Data Across Regions
This lesson explains how each data store replicates across Regions, which largely determines the achievable RPO and RTO.
Learning outcomes
After completing this lesson, you will be able to:
- Identify the multi-Region feature of each data store.
- Explain replication cost and failover testing.
- Add a secondary Region to an Aurora cluster.
Replication by data store
Each data store replicates across Regions in its own way, and the differences decide the achievable RPO and RTO. Aurora Global Database replicates at the storage layer to up to ten Regions with lag usually under a second. A switchover is a planned move with no data loss, while a failover after an outage has an RPO of about a second; both take about a minute. Write forwarding lets secondary Regions accept writes and pass them to the primary. DynamoDB global tables are multi-active: every replica accepts reads and writes, replicated asynchronously with last-writer-wins by default, or with multi-Region strong consistency for an RPO of zero.
S3 Cross-Region Replication copies new objects asynchronously. Replication Time Control guarantees 99.99% of objects within 15 minutes, and Batch Replication copies existing objects. S3 Multi-Region Access Points give one global endpoint that routes to the nearest bucket, with failover controls. RDS uses cross-Region read replicas, promoted on failover, and replicated backups. ElastiCache Global Datastore, EFS replication, FSx and AWS Backup copies, and DocumentDB global clusters cover other stores. The following table summarises the features.
| Data store | Feature | Behaviour |
|---|---|---|
| Aurora | Aurora Global Database | Storage-level replication to up to 10 Regions, lag under a second; switchover (planned, no data loss) or failover (RPO about 1 second) in about a minute; write forwarding |
| DynamoDB | Global tables | Multi-active: every replica reads and writes; asynchronous last-writer-wins by default, or multi-Region strong consistency for RPO zero |
| S3 | Cross-Region Replication | Asynchronous copies of new objects; Replication Time Control adds a 99.99%-in-15-minutes SLA; Batch Replication for existing objects |
| S3 | Multi-Region Access Points | One global endpoint routing to the nearest bucket, with failover controls |
| RDS | Cross-Region read replicas, backup replication | Promote replicas on failover |
| Others | ElastiCache Global Datastore, EFS replication, FSx and AWS Backup copies, DocumentDB global clusters | — |
1second
Typical Aurora Global Database lag, and so its RPO on failover
15min
S3 Replication Time Control target for 99.99% of objects
Cost and testing
Replication between Regions is charged for data transfer per gigabyte, in addition to the storage and compute of the replicas, so the volume replicated drives cost. Replicating only the data that recovery actually needs, compressing where the store allows it, and choosing asynchronous replication where its RPO is acceptable keep the cost in proportion to the requirement.
The achieved RPO is the actual replication lag, not the figure in a feature description, so lag metrics, such as Aurora's global replication lag, DynamoDB's ReplicationLatency and S3 replication metrics, are monitored with alarms. Regular failover tests then confirm that the replicas can be promoted and used within the RTO.
Adding a secondary Region to an Aurora cluster
An existing Aurora PostgreSQL cluster in eu-west-1 needs a recovery point objective of about one second in eu-central-1. The cluster becomes the primary of a global database, and a secondary cluster is created in the other Region:
aws rds create-global-cluster --global-cluster-identifier orders-global \
--source-db-cluster-identifier arn:aws:rds:eu-west-1:111111111111:cluster:orders
aws rds create-db-cluster --region eu-central-1 --db-cluster-identifier orders-euc1 \
--global-cluster-identifier orders-global --engine aurora-postgresql --engine-version 16.4 \
--kms-key-id arn:aws:kms:eu-central-1:111111111111:key/mrk-1234abcd12ab34cd56ef1234567890ab \
--db-subnet-group-name orders-db --vpc-security-group-ids sg-0db
aws rds create-db-instance --region eu-central-1 --db-instance-identifier orders-euc1-1 \
--db-cluster-identifier orders-euc1 --db-instance-class db.r7g.large --engine aurora-postgresqlReplication happens at the storage layer, so it does not load the primary's database engine. The secondary serves reads locally, and a switchover-global-cluster for planned moves or failover-global-cluster --allow-data-loss for disasters promotes it. Inter-Region replication traffic is charged, which is part of the price of the lower RPO.
Does S3 Replication copy objects that existed before the rule was created?
Show answer
No. Replication rules apply to new objects; existing objects are copied with S3 Batch Replication.
Exam Tips
Remember for the exam
- A relational database with an RPO of about one second and an RTO of about one minute points to Aurora Global Database.
- A planned Region switch with no data loss is an Aurora Global Database switchover.
- Active-active NoSQL across Regions points to DynamoDB global tables.
- S3 replication with an SLA requires Replication Time Control.
- To replicate existing S3 objects, use S3 Batch Replication.
- One global S3 endpoint with failover is provided by Multi-Region Access Points.