Warning
This document has not been updated for a while now. It may be out of date.
Last updated:
10 Apr 2024
Restore tables in AWS DynamoDB using PITR
This playbook describes how to restore a table using Amazon’s DynamoDB PITR.
We use DynamoDB Point in Time Recovery (PITR) backups to keep 35 days worth of changes to a configured dynamodb table.
Most dynamodb tables - for instance those used for terraform locks, do not include this functionality.
Prerequisites
- AWS account configured with the correct permissions
- Any browser
Restore a DynamoDB table via the AWS Console
The procedure for restoring a DynamoDB table using PITR is as follows:
- Navigate to DynamoDB > Tables > your table
- Select the Backups tab
- Click Restore
- Choose a name for your table (for example
CustomerApiKeys-restored
) - Pick either the latest snapshot or specify a date and time where the data was last in a good state
- Decide whether you need secondary indexes restored (pick
Restore the entire table
). This is more expensive but may be necessary if you have a lot of indexed data that is crucial for your application’s performance - Choose
Same Region
for the region - Choose
Owned by Amazon DynamoDB
for the encryption keys - Select Restore at the bottom of the form
Once the newly-restored table is available, you will need to configure your application to use it.
We recommend using environment variables to easily update your table names in your ECS application/lambda