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

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.
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1747500356633/082d90b2-cb54-4fcc-bcd8-93e69929082b.png align="center")
    

## 🛠 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 &gt; 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”**.
    
    ![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXchQrBHo1zoR-bHc47PyzblZt013RkVgXQ335f7Q6nOkAk7mZD0ejXOCICVF8c-XxKYentoVZSSj_iyk02by6hNTCGJgP_pDatTJjmgOw86_0OHT4Gv3m1D35abTY0tmA8vzPxI_g?key=w7Vteh5Mb4gMkEmUSh32fg align="left")
    

---

### 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.
    
    ![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXcdXvfl6_iXglQV-fTBHQPlFYzisDwDYExWRe_Zdr-EV39o67L9WJHCeDAWldt3U74H0CAgrc5gRKQQCkUS-qc4_KtUCrStLHdRcfUY7ALOhC-tNPO_Wjg_VfNF3_r21piOTLCc_Q?key=w7Vteh5Mb4gMkEmUSh32fg align="left")
    

---

### Step 3: Verify Replication

1. **Switch Region** to **ap-south-1**.
    
2. Go to **DynamoDB &gt; Tables**.
    
3. Confirm that `test-table` appears.
    
4. Open it and validate that the schema matches the original.
    
    ![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXcYaCyPq7azWg4P7XP48ZYMT1usKXxOZDO5Wfp87XAOa2j59ZvThKF7FJcfxe6d_deu7S6bgRzafkZ2H9NhWFvYc-IdhjJsRFC9S3N6AaiYxejdeSzBV9aTGGnhf3AI0SpeU177rQ?key=w7Vteh5Mb4gMkEmUSh32fg align="left")
    

### 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` &gt; **Explore table items** &gt; **Create item**.
    
3. Add:
    
    ```json
    {
      "UserID": "U001",
      "Name": "Alice"
    }
    ```
    
4. Click **"Create item"**.
    
    ![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXe6qcKIGWgePCz9VXu3_XXUrCxED1xnZfMjgYX5xj3EjWlCxoPt5lh9IbkxObUUuD5sEu9P4TBj8QXwcL2br-UI-6Dc-mONWiByz5Lmta7n9iAskhYtxfJagkaqymgLP30S6apl?key=w7Vteh5Mb4gMkEmUSh32fg align="left")
    

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

1. Switch to **ap-south-1**.
    
2. Navigate to `test-table` &gt; **Explore table items**.
    
3. Verify that Alice’s record is replicated.
    
    ![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXeAT0_87x1NTpx1etPe2qm2OKFoII8zupL2bE_5OpiMUKNxa09Je9PqA110wgnOQYqpsnJ_b__zfNt5NXMoiDH0SEftoqtrWveHpCDu3eWW-62hkU97pmgb-rmjFKPcKbfJZVFi?key=w7Vteh5Mb4gMkEmUSh32fg align="left")
    

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

1. In **ap-south-1**, add:
    
    ```json
    {
      "UserID": "U002",
      "Name": "Bob"
    }
    ```
    
2. Switch to **us-east-1** and verify Bob's entry is available there too.
    
    ![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXdKRN5iHt9-_9IQyjgPMgs1wkPJeVTsDcGk1PGOXAKY4RChpUp-fVBtgwGfKQSNgSqCUkjTBcmvw9pUPPtk_cQJTBtZz0Sk3dwgGKEHxa3p-eLexNiyXRz5yq6An4iHvAe_MXx83Q?key=w7Vteh5Mb4gMkEmUSh32fg align="left")
    

### 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:
    
    ```bash
    sudo nano /etc/hosts
    ```
    
2. Add the following line:
    
    ```bash
    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`.
    
    ![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXcs-U8VwIhApgkhKSueY5ktxnP15-D7TDEJPzPTSYmsiMlNXM7n_DOZ8XnOW4mb03MM34CZgFkfc68lRvyzfs7mDEvfICU_l7BG0VDOfj2KpkNpUJUEtpUfRNoH7DYT8ywCDWDwnA?key=w7Vteh5Mb4gMkEmUSh32fg align="left")
    

## ✅ 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

* [AWS Docs: DynamoDB Global Tables](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/GlobalTables.html)
    
* [Handling Conflicts in DynamoDB Global Tables](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/GlobalTables.HowItWorks.html)
    
* [DynamoDB Pricing](https://aws.amazon.com/dynamodb/pricing/)
    

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