Multi-Region data replication: SAA-C03 study notes and practice questions
What to know about Multi-Region data replication for the SAA-C03 exam, from the Design Resilient Architectures domain (26% of the exam guide), then 2 free questions to test it. Part of the SAA-C03 study guide.
When a scenario needs data in more than one Region, the choice depends on the data store, whether both Regions write, and how much lag is acceptable.
The options
Data
Service
Writes
Lag and failover
S3 objects
Cross-Region Replication (CRR)
Source bucket (or both, with two-way rules)
Asynchronous; most objects in seconds to minutes. S3 Replication Time Control adds an SLA of 99.99% of objects within 15 minutes
DynamoDB items
Global tables
Every replica Region (active-active)
Usually within a second; the default multi-Region eventual consistency resolves conflicts with last writer wins. A strong consistency mode is also available
Aurora
Aurora Global Database
Primary Region; secondaries are read-only (write forwarding is available)
Storage-level replication, typically under a second; managed failover or switchover to a secondary Region
RDS
Cross-Region read replica
Primary only
Asynchronous; promote the replica manually in a disaster
EBS, RDS snapshots, AMIs
Cross-Region copy (often through AWS Backup)
n/a
Point in time; restore takes time
S3 replication details
Versioning must be on for both buckets, and the rule needs an IAM role S3 can assume.
Existing objects aren’t replicated by a new rule; use S3 Batch Replication for them.
Replication can change the storage class or owner in the destination, and replicate SSE-KMS objects if you name a destination key.
Same-Region Replication copies between buckets in one Region, for example into a separate account for logs.
Multi-Region Access Points give one global endpoint that routes requests to the nearest bucket and can fail over.
How to choose
“Users write in both Regions with low latency and no custom code”: DynamoDB global tables.
“Relational database, read locally in a second Region, recover in about a minute if the primary Region fails”: Aurora Global Database.
“Copy new objects to another Region for compliance, with a predictable time”: S3 CRR with Replication Time Control.
Common traps
Forgetting versioning on S3 replication, or expecting existing objects to copy.
Choosing a cross-Region read replica for active-active writes. Replicas are read-only.
Writing a Lambda function to copy data between Regions when a native replication feature exists.
A gaming company stores player profiles in a single Amazon DynamoDB table in us-east-1.
It is launching in Europe, and players there must be able to update their profiles with low latency. If either AWS Region becomes unavailable, the application must keep accepting reads and writes in the other Region.
Losing a few seconds of recent updates during a Regional outage is acceptable. The team does not want to write or run any replication code.
Which solution meets these requirements with the LEAST operational overhead?
Choose one answer.
AA. Keep the table in us-east-1, turn on point-in-time recovery, and use AWS Backup to copy backups to eu-west-1 every hour.
BB. Convert the table to a DynamoDB global table with replicas in us-east-1 and eu-west-1, and send each player to the nearest replica.
CC. Create a second table in eu-west-1, and use DynamoDB Streams with AWS Lambda functions in each Region to copy changes to the other table.
DD. Migrate the profiles to an Amazon Aurora global database with a secondary cluster in eu-west-1, and turn on write forwarding there.
Show the answer and explanation
Answer: B
A. Wrong: Point-in-time recovery and cross-Region backup copies protect against data loss, but they give European players no local table to write to. After a Regional outage the team would first have to restore a new table from a backup, so writes would stop until the restore finished. A global table keeps a live, writable replica in each Region instead. Learn more: Cross-Region backups in AWS Backup (opens in a new tab)
B. Right: Correct. Every replica in a global table accepts reads and writes, and DynamoDB replicates changes between the replicas for you, so European players write to a nearby Region. In the default multi-Region eventual consistency mode, replication is asynchronous, which matches the stated tolerance for losing a few seconds of updates. If one Region fails, the application carries on with the replica in the other Region. Learn more: Global tables: multi-Region replication for DynamoDB (opens in a new tab)
C. Wrong: Streams and Lambda can copy item changes between two separate tables, so this design can work. However, the team would have to write, deploy and monitor the replication code, and handle retries, conflicting updates and changes being copied back and forth. Global tables give the same multi-Region, multi-writer result as a managed feature. Learn more: Change data capture for DynamoDB Streams (opens in a new tab)
D. Wrong: An Aurora global database has one primary cluster that performs all writes. Write forwarding lets the secondary cluster accept write statements, but it sends them to the writer in the primary Region, so European writes still cross the Atlantic. Migrating from DynamoDB to Aurora is also a large change that the requirements do not call for. Learn more: Using write forwarding in an Aurora MySQL global database (opens in a new tab)
Explanation
The requirements are low-latency writes in two Regions, continued reads and writes if one Region fails, a few seconds of acceptable data loss, and no custom replication code. DynamoDB global tables meet all of them: every replica is writable and replication is managed and asynchronous. Backups need a restore before writes resume, Streams with Lambda is custom code, and an Aurora global database has a single write Region.
Each player reads and writes the nearest replica, and DynamoDB replicates changes to the other Region.
A medical laboratory stores test reports in an Amazon S3 bucket in eu-west-2.
A new regulation requires that every report uploaded from now on is automatically copied to a second bucket, in the same AWS account, in eu-west-1. Reports already in the bucket do not need to be copied.
To control cost, the copies must be stored in the S3 Standard-IA storage class. The team wants to use managed S3 features rather than custom code.
Which TWO actions should a solutions architect take? (Choose two.)
Choose two answers.
AA. Turn on S3 Versioning for both buckets: the source bucket in eu-west-2 and the destination bucket in eu-west-1.
BB. Turn on S3 Versioning for the source bucket only, because the destination bucket just receives copies of new reports.
CC. Add an S3 Lifecycle rule to the source bucket that transitions each new report to Standard-IA in the eu-west-1 bucket.
DD. Add a replication rule on the source bucket that targets the eu-west-1 bucket with Standard-IA, using an IAM role for S3.
EE. Configure S3 Event Notifications to invoke an AWS Lambda function that copies each new report to the eu-west-1 bucket.
B. Wrong: Versioning on the source alone is not enough: S3 replication requires versioning on both the source and the destination buckets. Without it on the destination, the replication rule cannot be used and objects show a failed replication status. Learn more: How S3 Versioning works (opens in a new tab)
C. Wrong: Lifecycle rules change the storage class of objects or expire them within the same bucket. They cannot copy or move objects to another bucket or Region, so they cannot meet the copy requirement. Replication is the feature that copies objects to another Region. Learn more: Managing the lifecycle of objects (opens in a new tab)
D. Right: Correct. A replication rule copies new objects to the destination bucket automatically, using an IAM role that grants S3 permission to read the source and write to the destination. The rule can set the storage class of the replicas, so the copies can go straight into Standard-IA. Existing objects are not replicated, which the scenario allows. Learn more: Replicating objects within and across Regions (opens in a new tab)
Copying new objects to a bucket in another Region is S3 Cross-Region Replication. It needs versioning on both buckets, and a replication rule on the source bucket with an IAM role that S3 can assume; the rule can also set the replicas' storage class to Standard-IA. Lifecycle rules cannot move objects between Regions, and a Lambda copy is custom code.
Want more on Multi-Region data replication? The 5 full-length practice sets have 10 more Multi-Region data replication questions, 325 in all, none of them in the free exam. One payment of $14.99, no subscription. See the practice sets →