Tutorial: Deleting MRSC global tables in
DynamoDB
Multi-Region strong consistency (MRSC) is available in preview and is subject to change.
In preview, to delete an MRSC global table, you must delete two replica tables
in one action, leaving a single-Region table. Then, you can optionally delete
the remaining single-Region table. You can't delete only one replica table from
an MRSC global table and you can't delete all three replica tables from an MRSC
global table in one action.
- Using the AWS Management Console
-
This console procedure deletes an MRSC global table by deleting
two replica tables, resulting in a single-Region table.
-
Sign in to the AWS Management Console and open the DynamoDB console at
https://console.aws.amazon.com/dynamodb/.
-
From the top navigation pane, choose a Region containing
an MRSC global table. For example, choose
us-east-2
.
-
On the Tables page, choose the MRSC
global table.
-
Choose the Global tables tab, then
choose Delete replicas.
-
On the confirmation dialog that appears, type
confirm
.
The Region you selected in the console will contain
the remaining single-Region table after two replicas are
deleted from the MRSC global table.
-
Choose Delete.
- Using the AWS CLI
-
This AWS CLI procedure deletes an MRSC global table by deleting two
replica tables, resulting in a single-Region table.
-
Delete two replica tables from the MRSC global
table.
aws dynamodb update-table \
--table-name MusicTable \
--replica-updates '[{"Delete": {"RegionName": "us-east-1"}}, {"Delete": {"RegionName": "us-west-2"}}]' \
--region us-east-2
-
Verify that the remaining single-Region table is in the
ACTIVE state, and doesn't have any associated replica
tables.
aws dynamodb describe-table \
--table-name MusicTable \
--region us-east-2
{
"Table": {
"AttributeDefinitions": [
{
"AttributeName": "Artist",
"AttributeType": "S"
},
{
"AttributeName": "SongTitle",
"AttributeType": "S"
}
],
"TableName": "MusicTable",
"TableStatus": "ACTIVE",
...
}
}