Description
DynamoDB point-in-time recovery (PITR) restores a new table from a time you choose. You can select only times after you enabled PITR and within the retention window.
Potential impact
After an accidental update or deletion, a separate backup may not contain the last good version of the data.
Remediation
Set PointInTimeRecoveryEnabled: true in PointInTimeRecoverySpecification. Check the available restore window and test restoring a new table from a time before an unwanted change.
Examples
Both snippets show only the recovery setting. Supply the key schema and other required table properties.
Before
yaml
Resources:
MyDynamoDBTable:
Type: AWS::DynamoDB::Table
Properties:
PointInTimeRecoverySpecification:
PointInTimeRecoveryEnabled: false
After
yaml
Resources:
MyDynamoDBTable:
Type: AWS::DynamoDB::Table
Properties:
PointInTimeRecoverySpecification:
PointInTimeRecoveryEnabled: true