Is it possible to create DynamoDB global tables using the CloudFormation template? I was looking at this AWS doc - http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/globaltables.tutorial.html#creategt_cli
and it seems like one can create DynamoDB global tables only with the Console or the AWS CLI and not through CloudFormation templates?
Or Is there a specific hack where I'll create all the replica tables using CloudFormation and I'll create the global table manually using the AWS CLI?
Open the DynamoDB console at https://console.aws.amazon.com/dynamodb/home . For this example, choose the us-east-2 (US East Ohio) Region. In the navigation pane on the left side of the console, choose Tables. Choose Create Table.
Global tables replicate your DynamoDB tables automatically across your choice of AWS Regions. Global tables eliminate the difficult work of replicating data between Regions and resolving update conflicts, enabling you to focus on your application's business logic.
The table must have the same name as all of the other replicas. The table must have DynamoDB Streams enabled, with the stream containing both the new and the old images of the item. None of the new or existing replica tables in the global table can contain any data.
DynamoDB Global Tables allows deploying a multi-region, multi-master DynamoDB replication solution. It is a fully-managed solution, where users need not write any custom code to make changes to data. DynamoDB automatically updates the data before replicating it across different regions.
If you want to do it through cloudformation, you can do so using custom resources. It is pretty straight forward and easy to use. You can use their createGlobalTable API in your custom resource.
The DynamoDB Global Table
was introduced during the late 2017. Yes, as you mentioned, you can create the global tables using the AWS console or AWS CLI.
However, creating the global table using cloudformation template is yet to be available.
Meanwhile, please use the console or AWS CLI to create dynamodb global table.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With