Follow dba-ninja.com

Subscribe to RSS feed  Follow @jackvamvas - Twitter

*Use the Comments section for questions

dba-ninja.com Links

Dba_db2_button

Sqlserver_dba_button

How to delete a Global DynamoDB table

15 August,2024 by Rambler

Question: I want to delete a Global DynamoDB table  using AWS CLI commands if it's a Global Tables version 2019.11.21  version.

 

Answer: 

Step 1 : You can first identify if it's a Global Table and the version by executing this command.

 

aws dynamodb describe-table --table-name replace_with_table_name  --query Table.GlobalTableVersion 

 

Step 2 : If you want to identify the Replica  details of the Global Table 

aws dynamodb describe-table --table-name replace_with_table_name  --query Table.Replicas 

Step 3: The next step is to issue the dynamodb update-table command to delete the Replica .

 aws dynamodb update-table --table-name replace_with_table_name --replica-updates Delete={RegionName=my_regio}

You can confirm if the the Replica is deleted by using the Replica query from above in Step 2 .

Step 4 : Delete the main DynamoDB table. After you've completed Step 3 the DynamoDB table is no longer a Global Table. You can confirm via executing the command in Step 1 to check the GlobalTableVersion 

You can now proceed with deleting the DynamoDB table : 

 

aws dynamodb delete-table --table-name replace_with_table_name 

Author: Rambler (http://www.dba-ninja.com)


Share:

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been posted. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment on How to delete a Global DynamoDB table


dba-ninja.com