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
This is only a preview. Your comment has not yet been posted.
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.
Posted by: |