DynamoDB Global Tables - The Ultimate Guide

Written by Rafal Wilinski
Published: May 27th, 2020
Time to 10x your DynamoDB productivity with Dynobase [learn more]

What are DynamoDB Global Tables?
DynamoDB Global Tables are globally available, fully-managed, multi-master, multi-region DynamoDB tables with eventual cross-region replication. With global tables, you get a replica of your table in each of the desired regions. Once you write data to one of the replicas, it will be eventually replicated to the rest of the tables. This ensures high availability and low-latency access to data across different geographical locations.
How to Create Global Tables in DynamoDB? (Step by Step)
Create DynamoDB Global Tables using AWS Console
- Create a table as you would do that regularly. You can do that using AWS Console, Dynobase, CloudFormation, Serverless Framework, or whatever you like.
- Enable DynamoDB Streams on that table. They are required to create Global DynamoDB Table.
- Go to AWS DynamoDB Console, select your table, and head to the "Global Tables" section. Click "Add Region".

- Select the region and confirm the selection by clicking "Create Replica".

After a few seconds, your table in another region should be ready.
Create DynamoDB Global Tables using CloudFormation
If you want to create your Global DynamoDB Table using CloudFormation, you have to do that using custom resources and use their createGlobalTable API in your custom resource. This approach allows for more complex and automated deployments, especially in large-scale environments.
Create DynamoDB Global Tables using CDK
Creating DynamoDB Global Tables with CDK is fortunately much easier. The Table construct accepts the replicationRegions property, which is an array of regions where replica tables will be created. In TypeScript, you can use it like this:
Using DynamoDB Global Tables
Using DynamoDB Global Tables is quite similar to using standard DynamoDB tables. The key difference is the region you set when using the DynamoDB/DocumentClient SDK. Make sure you're using the region where your compute resources are deployed. If your Lambda functions or EC2 instances are deployed in a region where you don't have a DynamoDB Global Table replica, you might use a fallback to a base region. In Node.js, it might look like this:
Frequently Asked Questions
What is the DynamoDB Global Table replication latency?
ReplicationLatency metric is what you're looking for. This low latency ensures that your data is quickly available across all regions, providing a seamless experience for global applications.How much do DynamoDB Global Tables cost?
Replicated Write Request Units to all that. You can use our pricing calculator to estimate rough costs of your setup. Keep in mind that costs can vary significantly based on the amount of data written and read across regions.What are the DynamoDB Global Tables supported regions?
DynamoDB Global tables are now available in the following regions:
- US East (Ohio)
- US East (N. Virginia)
- US West (N. California)
- US West (Oregon)
- Asia Pacific (Mumbai)
- Asia Pacific (Seoul)
- Asia Pacific (Singapore)
- Asia Pacific (Sydney)
- Asia Pacific (Tokyo)
- Canada (Central)
- EU (Frankfurt)
- EU (Ireland)
- EU (London)
- EU (Paris)
- South America (Sao Paulo)
- AWS GovCloud (US-East)
- AWS GovCloud (US-West)