SkillSprout
Chapter 11 · Lesson 3
Advanced
7 min read

Cross-Region Replication

Overview

Cross-Region replication copies your data and sometimes your configuration to another AWS Region. Because a Region is a completely separate geographic area, replicating to a second Region protects you from large-scale failures, helps you meet data-residency and compliance requirements, and lets you serve users with lower latency from a nearby Region.

Almost every AWS storage and database service offers its own replication feature. S3 Cross-Region Replication (CRR) copies objects between buckets. Aurora Global Database and RDS cross-Region read replicas replicate relational data. DynamoDB Global Tables provide multi-Region, multi-active NoSQL. AWS Elastic Disaster Recovery replicates servers.

For the exam you need to know which feature fits which service, how lag and failover behave, and what you must configure (versioning, IAM roles, encryption keys, DNS failover).

Key Concepts

  • S3 CRR needs versioning on both buckets and an IAM role; it replicates new objects (use S3 Batch Replication for existing ones) asynchronously, and replication is not chained.
  • S3 Replication Time Control (RTC) gives an SLA: 99.99% of objects replicated within 15 minutes, with metrics and notifications.
  • RDS cross-Region read replicas replicate asynchronously; they can be promoted to a standalone DB during a disaster (manual).
  • Aurora Global Database: one primary Region and up to 5 secondary Regions, storage-based replication with typically under 1 second lag; RPO about 1 second, RTO under 1 minute (managed failover).
  • DynamoDB Global Tables are multi-Region, multi-active (read/write in every replica) with last-writer-wins conflict resolution; require streams.
  • EBS snapshots, AMIs, ECR images, AWS Backup can be copied or replicated across Regions; KMS keys are regional (use multi-Region keys for portability).
  • AWS Elastic Disaster Recovery (DRS) continuously replicates block-level data from servers to a low-cost staging area in another Region or AZ.
  • Route 53 failover routing and health checks, or Global Accelerator, redirect traffic to the surviving Region.

Detailed Notes

Why replicate across Regions?

GoalExample
Disaster recoverySurvive a Regional outage
LatencyServe users in Europe and Asia from local replicas
ComplianceKeep a copy of data in a different geography
OperationalTest or analyse data away from production

S3 replication

TypeDescription
CRRCross-Region Replication to a bucket in another Region
SRRSame-Region Replication (log aggregation, prod/test copies, different owner)
Batch ReplicationReplicates existing objects and failed replications
Replication Time Control15-minute SLA + metrics
Multi-Region Access PointsSingle global endpoint, routes to the closest bucket, supports failover

Rules to remember:

  • Versioning must be enabled on source and destination.
  • Needs an IAM role that S3 assumes; buckets can be in different accounts (with owner override option).
  • Only new objects after enabling replication are copied by default.
  • Delete markers can optionally be replicated; permanent version deletes are not (to guard against malicious deletes).
  • Replication is not transitive: A -> B -> C needs separate rules from each source.
  • SSE-KMS objects need a KMS key configured for the destination; SSE-C objects are not replicated by default.
  • Replicated objects can use a different storage class at the destination.
json
{
  "Role": "arn:aws:iam::111122223333:role/s3-replication",
  "Rules": [{
    "ID": "crr-all",
    "Status": "Enabled",
    "Priority": 1,
    "Filter": {},
    "DeleteMarkerReplication": { "Status": "Enabled" },
    "Destination": {
      "Bucket": "arn:aws:s3:::dr-bucket-eu-west-1",
      "StorageClass": "STANDARD_IA",
      "ReplicationTime": { "Status": "Enabled", "Time": { "Minutes": 15 } },
      "Metrics": { "Status": "Enabled", "EventThreshold": { "Minutes": 15 } }
    }
  }]
}

Relational databases

OptionReplicationLagFailover
RDS cross-Region read replica (MySQL, MariaDB, PostgreSQL, Oracle, SQL Server)Async, engine-levelSeconds to minutesManual promotion (becomes standalone)
Aurora cross-Region replicaAsync via binlogHigherManual promote
Aurora Global DatabaseStorage-level, dedicated infrastructure< 1 s typicalManaged failover (switchover/failover), RTO ~1 min, up to 5 secondary Regions

Aurora Global Database secondaries are read-only and can serve local low-latency reads; write forwarding lets secondaries forward writes to the primary. Cross-Region RDS replicas incur inter-Region data transfer charges, whereas RDS same-Region replicas do not.

DynamoDB Global Tables

Global tables replicate across chosen Regions, with active-active writes in any replica (typically sub-second replication). Conflicts are resolved by last writer wins. Requires DynamoDB Streams (enabled automatically) and consistent capacity settings (on-demand or auto scaling).

Other cross-Region building blocks

  • EBS snapshots / AMIs: copy-snapshot and copy-image to rebuild instances in the DR Region.
  • ECR cross-Region replication, Secrets Manager multi-Region secrets, KMS multi-Region keys, ElastiCache Global Datastore, EFS replication (to another Region, RPO ~minutes), FSx backups/replication.
  • AWS Backup cross-Region copy.
  • CloudFormation StackSets to deploy identical infrastructure in many Regions.
  • AWS Elastic Disaster Recovery (DRS) for EC2/on-premises servers.

Redirecting traffic

bash
aws route53 change-resource-record-sets --hosted-zone-id Z123 --change-batch file://failover.json
  • Route 53 failover routing (active-passive) uses health checks; latency or weighted routing for active-active.
  • Global Accelerator gives static anycast IPs and fails over in seconds without DNS caching delays.

Gotchas

  • Replication is asynchronous (except Global Tables semantics), so there is a non-zero RPO.
  • Encrypted data needs keys in the destination Region.
  • Replication does not protect against logical corruption (it replicates the corruption), so keep backups too.
  • Data transfer between Regions is charged.

Real World Example

Scenario — a global trading platform needs to survive a Regional outage.

The platform's primary Region is us-east-1 and its DR Region is us-west-2. Regulators require an RPO of seconds and RTO under 5 minutes.

  • Aurora Global Database replicates the order database with a replica lag of under one second. The team practises managed failover during DR drills.
  • DynamoDB Global Tables hold user sessions and preferences, active in both Regions.
  • Trade confirmations in S3 replicate to us-west-2 with CRR and Replication Time Control, so the 15-minute SLA is monitored.
  • Application stacks are deployed to both Regions with CloudFormation StackSets; the DR Region runs a small warm standby fleet in an Auto Scaling group.
  • Route 53 failover records with health checks (and Global Accelerator for the TCP trading feed) shift traffic when the primary Region fails.
  • KMS multi-Region keys and multi-Region secrets ensure the DR Region can decrypt data.

In a drill, they promoted the secondary Aurora cluster, scaled out the warm fleet, and flipped DNS, recovering in about four minutes with under two seconds of data loss.

Architecture Diagram

Cross-Region replication for disaster recovery
Architecture
AWS Cloud
Users
Route 53failover + health checks
Primary Region (us-east-1)
ALB + app fleet
Aurora primary
S3 bucket
DynamoDB table
DR Region (us-west-2)
ALB + standby fleet
Aurora secondary
S3 replica
DynamoDB replica

Data replicates from the primary Region to the DR Region; Route 53 fails traffic over.

  1. 1In normal operation Route 53 sends users to the primary Region; health checks monitor it.
  2. 2Aurora Global Database, S3 CRR and DynamoDB Global Tables replicate data asynchronously to the DR Region.
  3. 3If the primary Region fails, health checks fail and Route 53 returns the DR Region's endpoint.
  4. 4The Aurora secondary is promoted, the standby fleet scales out, and the application resumes from replicated data.

Best Practices

  • ✓Choose the replication feature by RPO: Aurora Global/DynamoDB Global Tables for seconds; S3 RTC for 15 minutes; backups for hours.
  • ✓Enable S3 versioning and RTC with metrics and alarm on replication lag and failures.
  • ✓Use KMS multi-Region keys and multi-Region secrets so DR can decrypt and authenticate.
  • ✓Automate infrastructure in both Regions with CloudFormation StackSets / IaC to avoid drift.
  • ✓Automate failover with Route 53 health checks or Global Accelerator, and rehearse with DR drills.
  • ✓Keep backups in addition to replication; replication copies corruption and deletions.
  • ✓Check service quotas, AMIs and capacity reservations in the DR Region ahead of time.
  • ✓Mind cost and compliance: inter-Region transfer fees and data-residency rules.

Common Interview Questions

Exam Tips

SAA-C03 focus

  • "Replicate S3 objects to another Region" -> CRR (needs versioning on both buckets + IAM role). Same Region -> SRR.
  • Existing objects are not replicated by default -> S3 Batch Replication. 15-minute SLA -> Replication Time Control.
  • Relational DB cross-Region DR with RPO ~1 s, RTO < 1 min -> Aurora Global Database.
  • Active-active multi-Region NoSQL -> DynamoDB Global Tables.
  • RDS cross-Region read replica can be promoted to a standalone DB for DR (manual, async).
  • Replication is asynchronous, so there is an RPO; Multi-AZ is the synchronous option, but same-Region only.
  • Encrypted resources across Regions: KMS keys are regional -> use multi-Region keys or re-encrypt on copy.
  • Automatic traffic failover -> Route 53 health checks + failover routing or Global Accelerator.

Finished this lesson?

0 of 64 lessons done · 0% of the course