Point-in-time recovery (PITR) is disabled on your DynamoDB table. You must enable continuous backups before you can restore to a specific point in time.
DynamoDB offers point-in-time recovery (PITR), which provides automatic continuous backups of your table data. This allows you to restore a table to any point in time within the last 35 days. When you attempt to restore a table using the RestoreTableToPointInTime API without having first enabled continuous backups, AWS throws the ContinuousBackupsUnavailableException error. Continuous backups must be explicitly enabled on a table before DynamoDB begins creating recovery points. This is a safety feature to ensure you have this capability available when you need it.
First, verify whether continuous backups are enabled on your table using the AWS CLI:
aws dynamodb describe-continuous-backups --table-name YOUR_TABLE_NAMELook at the PointInTimeRecoveryDescription object. If PointInTimeRecoveryStatus shows DISABLED, continuous backups are not enabled. The output will look like:
{
"ContinuousBackupsDescription": {
"PointInTimeRecoveryDescription": {
"PointInTimeRecoveryStatus": "DISABLED"
}
}
}Enable point-in-time recovery for your table by running:
aws dynamodb update-continuous-backups \
--table-name YOUR_TABLE_NAME \
--point-in-time-recovery-specification PointInTimeRecoveryEnabled=trueReplace YOUR_TABLE_NAME with your actual DynamoDB table name. This command enables continuous backups immediately and DynamoDB will start creating recovery points.
After enabling, verify the status changed to ENABLED:
aws dynamodb describe-continuous-backups --table-name YOUR_TABLE_NAMEYou should see:
{
"ContinuousBackupsDescription": {
"PointInTimeRecoveryDescription": {
"PointInTimeRecoveryStatus": "ENABLED",
"EarliestRestorableDateTime": "2025-01-01T14:30:00Z",
"LatestRestorableDateTime": "2025-01-02T14:30:00Z"
}
}
}Note the EarliestRestorableDateTime - DynamoDB needs time to capture recovery points, so the earliest restore time may be current time minus a few minutes.
If you prefer using the AWS Console instead of CLI:
1. Navigate to the DynamoDB console
2. In the left sidebar, select Tables
3. Click on your table name
4. Go to the Backups tab
5. Under Point in Time Recovery, click Edit
6. Toggle Turn on point-in-time recovery to enabled
7. Click Save changes
The console will confirm when PITR has been enabled.
Once continuous backups are enabled, you can restore to a point in time. You can restore using:
aws dynamodb restore-table-to-point-in-time \
--source-table-name YOUR_TABLE_NAME \
--target-table-name YOUR_TABLE_NAME_RESTORED \
--restore-date-time 2025-01-02T10:00:00ZOr use the AWS Console: Go to your table's Backups tab and select Restore to point in time.
Important: Restores always create a new table, not replacing the original. You can then rename or migrate data as needed.
Important considerations for continuous backups:
Recovery Window: After you enable PITR, DynamoDB begins capturing recovery points. The earliest restoreable datetime is typically current time minus a few seconds. You can restore to any point within the last 35 days once PITR is active.
Cost: Point-in-time recovery does NOT incur additional charges beyond your normal DynamoDB costs. It uses continuous backups that are managed by AWS.
Disabling PITR: If you disable PITR and later re-enable it, the recovery window resets. You lose the ability to restore to points before re-enabling. Be careful when toggling PITR off.
Deleted Tables: If you delete a table with PITR enabled, AWS automatically creates a system backup retained for 35 days at no cost, allowing recovery of the deleted table.
Cross-Region Restore: PITR can restore to a different AWS Region if needed, useful for disaster recovery scenarios.
Secondary Indexes: When you restore using PITR, Global Secondary Indexes (GSIs) and Local Secondary Indexes (LSIs) are restored to the state they were in at the restore timestamp.
ImportConflictException: There was a conflict when attempting to import to the table
How to fix 'ImportConflictException: There was a conflict when attempting to import to the table' in DynamoDB
ResourceNotFoundException: Requested resource not found
How to fix "ResourceNotFoundException: Requested resource not found" in DynamoDB
TrimmedDataAccessException: The requested data has been trimmed
How to fix "TrimmedDataAccessException: The requested data has been trimmed" in DynamoDB Streams
GlobalTableNotFoundException: Global Table not found
How to fix "GlobalTableNotFoundException: Global Table not found" in DynamoDB
InvalidExportTimeException: The specified ExportTime is outside of the point in time recovery window
How to fix "InvalidExportTimeException: The specified ExportTime is outside of the point in time recovery window" in DynamoDB