Skip to content

how to make non global dynamodb table Disaster Recovery ready

0

We have existing DynamoDB tables which are not global. Now we are planning to implement application disaster recovery ready. We have created and manage all the aws resources through cloudformation templates. As per aws documentation, you can not change the table type to Global through cloudformation template. As per AWS "...You cannot convert a resource of type AWS::DynamoDB::Table into a resource of type AWS::DynamoDB::GlobalTable by changing its type in your template. Doing so might result in the deletion of your DynamoDB table..." Ref: https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-resource-dynamodb-globaltable.html

Is there a way to make Dynamodb tables Global and at the same time there should be not drift.

1 Answer
1

To make your existing DynamoDB tables disaster recovery ready without causing drift in your CloudFormation managed resources, you can follow this approach:

  1. Set the deletion policy to "Retain" for your existing AWS::DynamoDB::Table resources in your CloudFormation template. This ensures the table isn't deleted when you remove it from the stack.

  2. Remove the table from your CloudFormation stack by updating your template to no longer include the table resource.

  3. Convert the standalone table to a global table using the AWS Management Console or AWS CLI.

  4. Import the newly created global table back into your CloudFormation stack as an AWS::DynamoDB::GlobalTable resource.

When defining your global table in CloudFormation, remember that each global table should be controlled by a single stack in a single region, regardless of how many replicas you have. You should not deploy the same AWS::DynamoDB::GlobalTable resource in multiple regions.

You can also enable deletion protection for your global tables by adding the "DeletionProtectionEnabled: true" property in the Replicas section of your AWS::DynamoDB::GlobalTable resource definition.
Sources
Global tables FAQ - AWS Prescriptive Guidance
Enable Deletion Protection on DynamoDb Globaltables using Cloudformation YAML | AWS re:Post

answered a year ago

AWS
EXPERT

revised a year ago

AWS
EXPERT

revised a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.