Recreate DynamoDB

Recreate DynamoDB

When failing back to the primary region, we need to get the latest data from the DynamoDB table in the backup region into the table in the primary region. We’ll do this by restoring the table from the backup region. Note that using DynamoDB Global Tables is a more convenient way to handle multi-region scenarios with DynamoDB, but in this example we’ll use the less convenient but more cost effective approach of relying on backups.

First, navigate the DynamoDB console in the primary region and delete the processed_tweets table.

Delete table

Now, in the backup region, go to the processed_tweets table. Select the Backups tab and, under the PITR section, choose Restore.

Restore table

Provide the table name (processed_tweets), select cross region restore, and pick the primary region.

Restore table

Once the table is active, you can perform a scan query and check that the item counts are in sync with the backup region.