> ## Documentation Index
> Fetch the complete documentation index at: https://notes.kodekloud.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Demo DynamoDB Global Table

> Step-by-step demo to create an Amazon DynamoDB table and configure a Global Table by adding a cross-Region replica, including setup, replication monitoring, and design considerations

In this lesson you'll create a simple Amazon DynamoDB table and convert it into a Global Table by adding a replica in a second Region. This enables multi-Region availability and cross-Region replication for greater resilience and lower read latency for geographically distributed users.

What you'll learn:

* Creating a DynamoDB table with an appropriate primary key
* Enabling a replica in another AWS Region to create a Global Table
* Key design, consistency, and cost considerations

Prerequisites

* An AWS account with permissions to manage DynamoDB and create service-linked roles (`dynamodb:*`, `iam:CreateServiceLinkedRole`).
* Familiarity with the AWS Management Console and the concept of AWS Regions.

## Overview of steps

1. Open the DynamoDB console
2. Create a new table
3. Confirm the table is Active
4. Add a replica (create the Global Table)
5. Verify replicas and monitor replication

***

## 1. Open the DynamoDB console

* In the AWS Console search bar, type `DynamoDB` and select the DynamoDB service.
* From the DynamoDB dashboard, choose the Tables view to manage or create tables.

## 2. Create a new table

* Click **Create table**.
* Enter a table name — in this example: `GlobalDemoTable1`.
* Add a partition key (primary key) named `UserID` of type `String`.
* Leave the sort key blank for this demo.
* Use the Default settings to create an on-demand (serverless) table — no capacity provisioning required.
* Do not add tags for this demo.

![A screenshot of the AWS Management Console showing the DynamoDB "Create table" page, with the Table settings panel highlighting "Default settings" and an option to "Customize settings." The lower part shows "Default table settings" details like table class and editable options.](https://mintcdn.com/kodekloud-c4ac6d9a/x-CkTJgJqym_5mBk/images/AWS-Certified-DevOps-Engineer-Professional/Domain-3-Resilient-Cloud-Solutions/Demo-DynamoDB-Global-Table/aws-dynamodb-create-table-default-settings.jpg?fit=max\&auto=format\&n=x-CkTJgJqym_5mBk\&q=85\&s=e5e4200fd933258cf29f7f9e32ee193e)

Quick configuration reference

| Setting | Value (example) |
| - | - |
| Table name | `GlobalDemoTable1` |
| Partition key | `UserID` (String) |
| Sort key | none |
| Billing mode | On-demand (Default settings) |
| Initial Region | `us-east-2` (US East — Ohio) |

## 3. Finish creation and confirm status

* Click **Create**. Table creation is usually quick.
* Refresh the Tables list and wait for the table to show `Active` status.
* Note the AWS Region where the table was created — this example uses US East (Ohio) `us-east-2`.

![A screenshot of the AWS DynamoDB console with a green success banner reading "The GlobalDemoTable1 table was created successfully." The Tables list shows "GlobalDemoTable1" with status Active and its partition key UserID.](https://mintcdn.com/kodekloud-c4ac6d9a/x-CkTJgJqym_5mBk/images/AWS-Certified-DevOps-Engineer-Professional/Domain-3-Resilient-Cloud-Solutions/Demo-DynamoDB-Global-Table/dynamodb-console-globaldemotable1-created.jpg?fit=max\&auto=format\&n=x-CkTJgJqym_5mBk\&q=85\&s=0cd20f040920e4bcbd69b0406015fae2)

## 4. Add a replica (create the global table)

* In the Tables list, select the checkbox next to your table (`GlobalDemoTable1`).
* From the **Actions** menu, choose **Update settings**.
* Scroll to and expand **Global Tables**.
* Click **Create replica**.
* Select the target Region for the replica — in this example, US East (N. Virginia) `us-east-1`.
* Confirm and choose **Create** to start replica creation and initial backfill.

When you create a replica, DynamoDB will create (or use) a service-linked IAM role such as `AWSServ​iceRoleForDynamoDBReplication` to allow DynamoDB to perform cross-Region replication on your behalf. This is normally handled automatically.

![A screenshot of the AWS DynamoDB console on the "Create replica" replication settings page, showing the current region as United States (Ohio) us-east-2 and the IAM role AWSServ​iceRoleForDynamoDBReplication. The page shows consistency options with "Eventual consistency" selected and "Strong consistency" available.](https://mintcdn.com/kodekloud-c4ac6d9a/x-CkTJgJqym_5mBk/images/AWS-Certified-DevOps-Engineer-Professional/Domain-3-Resilient-Cloud-Solutions/Demo-DynamoDB-Global-Table/dynamodb-create-replica-us-east-2-eventual.jpg?fit=max\&auto=format\&n=x-CkTJgJqym_5mBk\&q=85\&s=315ca5d64d0ff4ec7ab6c9b1bceec826)

DynamoDB typically creates the service-linked role automatically. This role grants the necessary permissions for replicating items across Regions, so manual IAM configuration for replication is usually unnecessary.

Notes about replication:

* Initial replication (backfill) copies your existing items to the new Region — time varies with table size and network conditions.
* Monitor progress in the console and refresh until the replica shows `Active` status.

## 5. Verify replicas

* Once replication completes, open your table and view the **Replicas** section.
* You should see the original Region and any replica Regions listed, each with a replication status (e.g., `Active`).

![A screenshot of the AWS DynamoDB console for the table "GlobalDemoTable1." It shows the Replicas section listing US regions (N. Virginia us-east-1 and Ohio us-east-2) with Active statuses.](https://mintcdn.com/kodekloud-c4ac6d9a/x-CkTJgJqym_5mBk/images/AWS-Certified-DevOps-Engineer-Professional/Domain-3-Resilient-Cloud-Solutions/Demo-DynamoDB-Global-Table/dynamodb-globaldemotable1-replicas-us-east.jpg?fit=max\&auto=format\&n=x-CkTJgJqym_5mBk\&q=85\&s=a6c7596bfadf558e1ee3dfde1b8d6f95)

Key points and considerations

* What we did: created a DynamoDB table in one Region and added a replica in another, enabling automatic cross-Region replication (Global Table).
* Consistency model: Global Tables use asynchronous replication by default (eventual consistency) across Regions. Strongly consistent reads are only available within a single Region — cross-Region strong consistency is not supported.
* Use cases: Global Tables are suitable for multi-Region high availability, reduced read latency for distributed users, and disaster recovery scenarios.

Global Tables incur additional costs for cross-Region write replication and storage. Evaluate cost and latency trade-offs before enabling multi-Region replication. Also design your application for the eventual consistency model (e.g., conflict resolution and read-after-write expectations).

Cleaning up (delete a replica)

* To remove a replica: open the Replicas list, select the replica to delete, and choose **Delete**.
* After deleting replicas, you can delete the main table if it is no longer needed.

Summary

* DynamoDB Global Tables let you replicate a single logical table across multiple AWS Regions, providing multi-Region availability and lower latency for distributed applications.
* Use Global Tables when you need geographically distributed reads/writes and higher resilience; rely on Multi-AZ within a Region for regional high availability.

Links and references

* DynamoDB Global Tables documentation: [https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/GlobalTables.html](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/GlobalTables.html)
* Service-linked role info: [https://docs.aws.amazon.com/IAM/latest/UserGuide/using-service-linked-roles.html](https://docs.aws.amazon.com/IAM/latest/UserGuide/using-service-linked-roles.html)
* DynamoDB best practices: [https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/best-practices.html](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/best-practices.html)

> **[Watch Video](https://learn.kodekloud.com/user/courses/aws-certified-devops-engineer-professional/module/614fb8a5-8397-4ea6-9d7c-fe05ebc43d18/lesson/9af82e1b-135c-43cf-a3d5-2f529ff15742)**


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.