AWS Database Blog

Announcing configurable point-in-time recovery periods for Amazon DynamoDB

Amazon DynamoDB enables you to back up your table data continuously by using point-in-time recovery (PITR). When you enable PITR, DynamoDB backs up your table data automatically with per-second granularity. PITR helps protect you against accidental writes and deletes. For example, if a test script accidentally writes to a production DynamoDB table, or someone mistakenly issues a DeleteItem request, with PITR, you can restore your table to a state before the data corruption.

PITR, by default, takes continuous backups for 35 days, which means you can recover your table from any time in the past 35 days. However, due to various data compliance and regulatory requirements, some customers need their PITR period to be shorter.

Today, we’re adding support for configurable recovery periods for PITR. You can now set the PITR period for each table to between 1 – 35 days. For example, if you set your recovery period to 7 days, you will get a rolling period of the latest 7 days of continuous backups that you can use to restore your table. As always, you can restore to any second within the recovery period.

Enable PITR in DynamoDB

You can enable PITR and adjust the recovery period using the AWS Management Console, AWS Command Line Interface (AWS CLI), AWS CloudFormation, AWS Cloud Development Kit (AWS CDK), or SDK. To use the console, complete the following steps:

  1. On the DynamoDB console, choose Tables in the navigation pane.
  2. Choose the table you want to enable PITR for.
  3. Choose Edit point-in-time recovery settings.
  4. Select Turn on point-in-time recovery (if it’s not already enabled).
  5. For Backup recovery period, specify the length of your recovery period (1–35 days).
  6. Choose Save changes.

Console Edit PITR Settings

Considerations

When you change the period on a table where PITR was already enabled, you should be mindful of how it impacts your earliest restore point. Decreasing your PITR period will immediately reduce your earliest restore point to match the recovery period you set. This means you can’t restore from any continuous backups that were previously available, but are now outside of your configured recovery period.

Pricing of PITR is still based on the size of the DynamoDB table (table data and local secondary indexes) on which it is enabled, regardless of the chosen recovery period.

Conclusion

DynamoDB PITR now supports a configurable PITR period for customers that have compliance or data retention policies that require a recovery period shorter than 35 days. To get started, see Point-in-time backups for DynamoDB.


About the Authors

Jason Hunter is a California-based Principal Solutions Architect specializing in Amazon DynamoDB. He’s been working with NoSQL databases since 2003. He’s known for his contributions to Java, open source, and XML. You can find more DynamoDB posts and others posts written by Jason Hunter in the AWS Database Blog.

Shahzeb Farrukh is a Seattle-based Senior Product Manager at AWS. He works on DynamoDB data protection features like backups and restores, and data movement capabilities that help customers integrate their data with other services. He has been working with databases and analytics since 2010.