Tutorial: Deleting MRSC global tables in DynamoDB - Amazon DynamoDB

Tutorial: Deleting MRSC global tables in DynamoDB

Note

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.

  1. Sign in to the AWS Management Console and open the DynamoDB console at https://console.aws.amazon.com/dynamodb/.

  2. From the top navigation pane, choose a Region containing an MRSC global table. For example, choose us-east-2.

  3. On the Tables page, choose the MRSC global table.

  4. Choose the Global tables tab, then choose Delete replicas.

  5. On the confirmation dialog that appears, type confirm.

    Note

    The Region you selected in the console will contain the remaining single-Region table after two replicas are deleted from the MRSC global table.

  6. 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.

  1. 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
  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", ... } }