Set Up Cross-Region Disaster Recovery for DynamoDB Using Global Tables (Step-by-Step Guide)

DevOpsofworldDevOpsofworld
3 min read

In today’s cloud-native world, ensuring the continuous availability of data across regions is crucial. Amazon DynamoDB Global Tables offer a powerful, fully managed solution for building active-active cross-region architectures with built-in replication.

In this post, we’ll walk through how to set up a cross-region disaster recovery (DR) strategy for DynamoDB using Global Tables across us-east-1 and ap-south-1, covering setup, replication, and failover validation.

🔧 Use Case

  • Architecture: Active-Active (bi-directional replication)

  • Primary Region: us-east-1 (US East - N. Virginia)

  • Disaster Recovery Region: ap-south-1 (Asia Pacific - Mumbai)

  • Objective: Set up Global Tables in DynamoDB to ensure DR-readiness with real-time replication.

🛠 Step-by-Step Setup

Step 1: Create a DynamoDB Table in the Primary Region

  1. Log in to the AWS Management Console.

  2. Switch Region to US East (N. Virginia) – us-east-1.

  3. Navigate to Services > DynamoDB.

  4. Click on "Create Table".

  5. Enter table details:

    • Table name: test-table

    • Partition key: user-id (String)

  6. Leave defaults as-is (On-demand billing recommended).

  7. Click "Create Table".

  8. Wait until the table status is “Active”.


Step 2: Add Replica Region (ap-south-1)

  1. While still in us-east-1, open the test-table.

  2. Go to the "Global Tables" tab.

  3. Click "Add region".

  4. Select Asia Pacific (Mumbai) – ap-south-1.

  5. Click "Create Replica".

  6. AWS will provision a replica in ap-south-1 with automatic schema synchronization.


Step 3: Verify Replication

  1. Switch Region to ap-south-1.

  2. Go to DynamoDB > Tables.

  3. Confirm that test-table appears.

  4. Open it and validate that the schema matches the original.

Step 4: Test Bi-Directional Replication

A. Insert Data in Primary (us-east-1)

  1. Switch back to us-east-1.

  2. Open test-table > Explore table items > Create item.

  3. Add:

     {
       "UserID": "U001",
       "Name": "Alice"
     }
    
  4. Click "Create item".

B. Verify in DR Region (ap-south-1)

  1. Switch to ap-south-1.

  2. Navigate to test-table > Explore table items.

  3. Verify that Alice’s record is replicated.

C. Insert in DR Region (ap-south-1)

  1. In ap-south-1, add:

     {
       "UserID": "U002",
       "Name": "Bob"
     }
    
  2. Switch to us-east-1 and verify Bob's entry is available there too.

Step 5: Simulate Region Failure (Optional Testing)

To test failover without bringing down the actual AWS region:

  1. Block the us-east-1 endpoint locally:

     sudo nano /etc/hosts
    
  2. Add the following line:

     127.0.0.1 dynamodb.us-east-1.amazonaws.com
    
  3. Now perform read/write operations only in ap-south-1.

  4. Once done, remove or comment out the line from /etc/hosts.

✅ Conclusion

With DynamoDB Global Tables, building a resilient, low-latency, and globally available application becomes straightforward. This architecture is ideal for mission-critical systems that demand real-time DR and global data access. By following this guide, you’ve successfully implemented an active-active cross-region DR strategy using only the AWS Console.

📌 Further Reading

💬 Have you implemented cross-region DR for DynamoDB or other AWS services? Share your setup in the comments!

0
Subscribe to my newsletter

Read articles from DevOpsofworld directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

DevOpsofworld
DevOpsofworld