Bird
Raised Fist0
DynamoDBquery~20 mins

Cross-region replication (Global Tables) in DynamoDB - Practice Problems & Coding Challenges

Choose your learning style10 modes available
Challenge - 5 Problems
🎖️
Global Tables Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
How does DynamoDB Global Tables handle data replication?

Which statement best describes how DynamoDB Global Tables replicate data across regions?

AData is asynchronously replicated between regions with eventual consistency.
BData is synchronously replicated with strong consistency across all regions.
CData replication happens only when manually triggered by the user.
DData is replicated only for read operations, not writes.
Attempts:
2 left
💡 Hint

Think about how DynamoDB balances latency and consistency in global replication.

❓ query_result
intermediate
2:00remaining
Result of a write conflict in DynamoDB Global Tables

Given two concurrent writes to the same item in different regions, what is the expected outcome in DynamoDB Global Tables?

AThe write in the primary region always overwrites the other.
BAn error is returned to the client indicating a conflict.
CBoth writes are merged automatically without conflicts.
DThe last write based on timestamp wins and overwrites the other.
Attempts:
2 left
💡 Hint

Consider how DynamoDB resolves conflicts using timestamps.

📝 Syntax
advanced
2:00remaining
Identify the error in creating a Global Table

Which option contains a valid AWS CLI command to create a DynamoDB Global Table with two regions?

DynamoDB
aws dynamodb create-global-table --global-table-name MyGlobalTable --replication-group RegionName=us-east-1 RegionName=eu-west-1
Aaws dynamodb create-global-table --global-table-name MyGlobalTable --replication-group '[{"RegionName":"us-east-1"},{"RegionName":"eu-west-1"}]'
Baws dynamodb create-global-table --global-table-name MyGlobalTable --replication-group RegionName=us-east-1 RegionName=eu-west-1
Caws dynamodb create-global-table --global-table-name MyGlobalTable --replication-group RegionName=us-east-1,RegionName=eu-west-1
Daws dynamodb create-global-table --global-table-name MyGlobalTable --replication-group '[RegionName=us-east-1,RegionName=eu-west-1]'
Attempts:
2 left
💡 Hint

Check the correct JSON format for the replication group parameter.

❓ optimization
advanced
2:00remaining
Optimizing read latency with Global Tables

You want to minimize read latency for users in multiple regions using DynamoDB Global Tables. Which strategy is best?

AAlways read from the us-east-1 region regardless of user location.
BDirect reads to the nearest regional replica of the Global Table.
CUse a single region Global Table and replicate data manually.
DDisable Global Tables and use local tables with periodic batch sync.
Attempts:
2 left
💡 Hint

Think about how Global Tables distribute data for low latency.

🔧 Debug
expert
3:00remaining
Diagnosing replication lag in DynamoDB Global Tables

You notice that updates made in one region are not appearing promptly in another region's replica. Which is the most likely cause?

AStrong consistency setting enabled causing replication to block.
BWrites are being rejected due to exceeding provisioned throughput.
CNetwork issues causing delayed asynchronous replication.
DGlobal Table is configured with only one region.
Attempts:
2 left
💡 Hint

Consider how replication works and what can delay it.

Practice

(1/5)
1. What is the main purpose of DynamoDB Global Tables in cross-region replication?
easy
A. To keep data copied and synchronized across multiple AWS regions
B. To create backups of tables in the same region
C. To increase the size limit of a single DynamoDB table
D. To encrypt data only in one region

Solution

  1. Step 1: Understand Global Tables concept

    Global Tables replicate data automatically across multiple AWS regions to keep them in sync.
  2. Step 2: Identify the main purpose

    This replication helps applications stay fast and available worldwide by having data close to users.
  3. Final Answer:

    To keep data copied and synchronized across multiple AWS regions -> Option A
  4. Quick Check:

    Global Tables = cross-region data sync [OK]
Hint: Global Tables = data sync across regions [OK]
Common Mistakes:
  • Confusing backups with replication
  • Thinking Global Tables increase table size
  • Assuming encryption is the main feature
2. Which AWS CLI command is used to create a DynamoDB Global Table?
easy
A. aws dynamodb delete-global-table --table-name MyTable
B. aws dynamodb create-table --table-name MyTable --region us-east-1
C. aws dynamodb create-global-table --global-table-name MyTable --replication-group RegionName=us-east-1
D. aws dynamodb update-global-table --table-name MyTable

Solution

  1. Step 1: Identify the correct command for creating Global Tables

    The command to create a Global Table is create-global-table with replication group specifying regions.
  2. Step 2: Check options

    aws dynamodb create-global-table --global-table-name MyTable --replication-group RegionName=us-east-1 uses create-global-table with replication group, which is correct. Others are for creating normal tables, updating, or deleting.
  3. Final Answer:

    aws dynamodb create-global-table --global-table-name MyTable --replication-group RegionName=us-east-1 -> Option C
  4. Quick Check:

    Create Global Table = create-global-table command [OK]
Hint: Use create-global-table to make Global Tables [OK]
Common Mistakes:
  • Using create-table instead of create-global-table
  • Confusing update or delete commands
  • Missing replication group parameter
3. Given a DynamoDB Global Table replicated in us-east-1 and eu-west-1, what happens if you write an item in us-east-1?
medium
A. The item is immediately available in eu-west-1 after replication
B. The item is only stored in us-east-1 and not replicated
C. The write fails because cross-region writes are not allowed
D. The item is stored in eu-west-1 but not in us-east-1

Solution

  1. Step 1: Understand replication behavior of Global Tables

    Global Tables replicate writes made in one region to all other regions automatically and quickly.
  2. Step 2: Apply to the scenario

    Writing an item in us-east-1 will replicate it to eu-west-1, making it available there.
  3. Final Answer:

    The item is immediately available in eu-west-1 after replication -> Option A
  4. Quick Check:

    Write in one region = replicate to others [OK]
Hint: Writes replicate automatically across regions [OK]
Common Mistakes:
  • Thinking writes stay local only
  • Assuming writes fail across regions
  • Confusing replication direction
4. You tried to add a new region to an existing Global Table but got an error. What is a common cause?
medium
A. You forgot to enable encryption on the new region
B. The new region's table has a different primary key schema
C. Global Tables do not support more than two regions
D. You used the update-table command instead of update-global-table

Solution

  1. Step 1: Check schema requirements for Global Tables

    All replicas in Global Tables must have the same primary key schema to replicate correctly.
  2. Step 2: Identify cause of error

    If the new region's table has a different primary key schema, adding it will fail.
  3. Final Answer:

    The new region's table has a different primary key schema -> Option B
  4. Quick Check:

    Matching primary keys required for Global Tables [OK]
Hint: All regions must share the same primary key schema [OK]
Common Mistakes:
  • Assuming encryption causes add-region errors
  • Believing Global Tables limit regions to two
  • Confusing update-table with update-global-table commands
5. You want to design a Global Table for a worldwide app with users in Asia, Europe, and America. Which strategy best reduces latency and ensures data consistency?
hard
A. Create replicas in Asia, Europe, and America with strongly consistent reads enabled
B. Create a single table in one region and route all traffic there
C. Create replicas only in Asia and America to reduce costs
D. Create replicas in Asia, Europe, and America regions with eventual consistency reads

Solution

  1. Step 1: Consider latency and availability

    Replicas in all user regions reduce latency by serving data locally.
  2. Step 2: Understand consistency trade-offs

    Strongly consistent reads across regions are not supported; eventual consistency is used to balance latency and consistency.
  3. Step 3: Evaluate options

    Create replicas in Asia, Europe, and America regions with eventual consistency reads creates replicas in all needed regions with eventual consistency, which is best for performance and availability.
  4. Final Answer:

    Create replicas in Asia, Europe, and America regions with eventual consistency reads -> Option D
  5. Quick Check:

    Global Tables + eventual consistency = low latency worldwide [OK]
Hint: Use replicas in all regions with eventual consistency [OK]
Common Mistakes:
  • Expecting strong consistency across regions
  • Using single region causing high latency
  • Skipping regions to save cost but hurting users
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard