Suppose you have a DynamoDB table in N AWS regions (i.e. 1 table in each region, N tables in total), and you want to replicate changes in any of the tables in a region to all other regions automatically.
Here how you may do this with dynamodb-replicator (the image illustrates the case where N = 3, i.e. 3 AWS regions):
- Grab package.zip of any of the dynamodb-replicator releases.
- Deploy the package as NodeJS AWS Lambda in each region.
- Assign role to the Lambda for access to the target tables.
- Subscribe the Lambda to the changes of target DynamoDb tables in each region.
You can take a look at a dummy example where a single DynamoDB table called "Table" is replicated. Here is a CloudFormation.json template for this particular example.
For the background behind this little library and why you would want to use it, check out this article: How To Easily Replicate DynamoDB Across Regions.