DynamoDB Point-in-Time Recovery (PITR) Explained

PITR restores a table to any second in the last 35 days. How to switch it on, how a restore really runs, what it costs, and where on-demand backups win.

Orlando Adeyemi 8 min read

Data loss can be catastrophic for any business. Whether it’s due to accidental deletion, a buggy application update, or malicious activity, losing critical data in your DynamoDB tables could severely impact your operations. Amazon DynamoDB’s Point-In-Time Recovery (PITR) feature offers a robust solution to protect your data and enable swift recovery when things go wrong.

What is Point-In-Time Recovery?

Point-In-Time Recovery (PITR) is a continuous backup mechanism that enables you to restore your DynamoDB table to any point in time within the last 35 days. This capability allows for granular recovery, letting you roll back to a specific second in the past.

Key Benefits of PITR

  1. Continuous Backup: Automatic, continuous backups of your DynamoDB table data
  2. Granular Recovery: Restore to any point in time within the retention period (down to the second)
  3. Simplified Compliance: Helps meet regulatory and business continuity requirements
  4. No Performance Impact: Backups occur without affecting table performance or availability
  5. Protection Against Various Threats: Guards against accidental writes, application errors, and malicious actions

How PITR Works in DynamoDB

DynamoDB PITR works by continuously capturing changes to your table as they occur. These incremental backups are stored in a highly durable manner, separate from your primary table data.

The Technical Process

  1. Change Tracking: PITR tracks all changes to your table’s data
  2. Incremental Backups: Only changes (deltas) are stored, making the process efficient
  3. Secure Storage: Backups are stored across multiple Availability Zones
  4. 35-Day Retention: Changes are kept for a rolling 35-day window
  5. Eventual Consistency: The PITR system typically maintains a recovery point within 5 minutes of current time

Backup Stream Architecture

Text
┌─────────────┐   ┌─────────────┐   ┌─────────────┐   ┌─────────────┐│ DynamoDB    │   │ Backup      │   │ Incremental │   │ Multi-AZ    ││ Table       │──▶│ Service     │──▶│ Change Log  │──▶│ Storage     │└─────────────┘   └─────────────┘   └─────────────┘   └─────────────┘

This architecture ensures that your backups are:

  • Durable (stored redundantly)
  • Isolated (protected from primary table failures)
  • Complete (capturing all changes)

Enabling PITR for Your Tables

PITR is not enabled by default, but it’s simple to activate through the AWS Console, CLI, or SDKs.

Using the AWS Console

  1. Navigate to the DynamoDB console
  2. Select your table
  3. Click on the “Backups” tab
  4. In the “Point-in-time recovery” section, click “Edit”
  5. Toggle “Point-in-time recovery” to “Enabled”
  6. Click “Save changes”

Using the AWS CLI

Shell
aws dynamodb update-continuous-backups \  --table-name YourTableName \  --point-in-time-recovery-specification PointInTimeRecoveryEnabled=true

Using the AWS SDK (JavaScript Example)

JavaScript
const AWS = require('aws-sdk');const dynamodb = new AWS.DynamoDB();const params = {  TableName: 'YourTableName',  PointInTimeRecoverySpecification: {    PointInTimeRecoveryEnabled: true  }};dynamodb.updateContinuousBackups(params, function(err, data) {  if (err) console.log(err, err.stack);  else console.log('PITR enabled successfully', data);});

Checking PITR Status

To verify that PITR is enabled:

Shell
aws dynamodb describe-continuous-backups --table-name YourTableName

The output should show:

JSON
{    "ContinuousBackupsDescription": {        "ContinuousBackupsStatus": "ENABLED",        "PointInTimeRecoveryDescription": {            "PointInTimeRecoveryStatus": "ENABLED",            "EarliestRestorableDateTime": "2025-02-10T00:00:00Z",            "LatestRestorableDateTime": "2025-03-10T12:00:00Z"        }    }}

Restoring a Table Using PITR

When you need to recover data, PITR allows you to restore your table to any point in time within the 35-day window.

Restoration Process

  1. Select a Restore Point: Choose a timestamp within the last 35 days
  2. Create a New Table: The restore always creates a new table (doesn’t overwrite the original)
  3. Configure New Table Settings: Specify indexes, encryption, and other settings
  4. Wait for Restoration: Depending on table size, restoration can take from minutes to hours

Using the AWS Console for Restoration

  1. In the DynamoDB console, select your table
  2. Click on the “Backups” tab
  3. In the “Point-in-time recovery” section, click “Restore”
  4. Select your restore point (date and time)
  5. Enter a name for the new table
  6. Configure settings for the new table (encryption, tags, etc.)
  7. Click “Restore”

Using the AWS CLI for Restoration

Shell
aws dynamodb restore-table-to-point-in-time \  --source-table-name OriginalTableName \  --target-table-name RestoredTableName \  --use-latest-restorable-time

Or to restore to a specific time:

Shell
aws dynamodb restore-table-to-point-in-time \  --source-table-name OriginalTableName \  --target-table-name RestoredTableName \  --restore-date-time 2025-03-01T12:30:00Z

Using the AWS SDK (JavaScript Example)

JavaScript
const AWS = require('aws-sdk');const dynamodb = new AWS.DynamoDB();const params = {  SourceTableName: 'OriginalTableName',  TargetTableName: 'RestoredTableName',  RestoreDateTime: new Date('2025-03-01T12:30:00Z')  // Alternatively, use: UseLatestRestorableTime: true};dynamodb.restoreTableToPointInTime(params, function(err, data) {  if (err) console.log(err, err.stack);  else console.log('Restoration started successfully', data);});

Monitoring the Restoration Process

You can track the restoration progress in the AWS Console or by using:

Shell
aws dynamodb describe-table --table-name RestoredTableName

Look for the TableStatus field – it will show CREATING during restoration and ACTIVE when complete.

PITR vs. On-Demand Backups

DynamoDB offers two backup mechanisms: PITR and On-Demand Backups. Understanding the differences helps you choose the right approach for your needs.

FeaturePoint-In-Time RecoveryOn-Demand Backups
Retention Period35 days (fixed)Unlimited (until manually deleted)
Backup FrequencyContinuousManual or scheduled
Restoration GranularityAny second within 35 daysOnly to backup creation time
Backup TimeNo additional time neededTime proportional to table size
Ideal Use CaseProtection against recent data corruption or deletionLong-term archival needs
CostHigher ongoing costLower cost for infrequent backups
Regulatory ComplianceBetter for strict recovery point objectivesBetter for long-term retention requirements

When to Use PITR

  • When you need to protect against accidental data modifications
  • For applications with low recovery point objectives (RPOs)
  • When continuous protection is more important than backup longevity

When to Use On-Demand Backups

  • For creating milestone snapshots (e.g., before major releases)
  • When long-term retention (beyond 35 days) is needed
  • When you want to save costs for less critical tables

Using Both Together

Many organizations employ both mechanisms as part of a comprehensive backup strategy:

  • PITR for short-term, granular recovery
  • On-demand backups for long-term archival needs

Costs and Performance Considerations

PITR is a premium feature with its own pricing considerations.

Cost Structure

PITR pricing is based on:

  1. Storage Used: You pay for the storage of backup data
  2. Restore Actions: You pay for restore operations

As of 2025, the typical costs are:

  • PITR backup storage: $0.20 per GB-month
  • Restore operations: $0.15 per GB restored

Cost Optimization Strategies

  1. Selective Enablement: Enable PITR only for business-critical tables
  2. Clean Up Old Data: Regularly remove unnecessary data from tables
  3. Item Size Management: Keep items as small as possible (use S3 for large objects)
  4. Monitor Usage: Track PITR costs through AWS Cost Explorer

Performance Impact

One of PITR’s key advantages is its minimal impact on your production workload:

  • No Performance Penalty: PITR operations do not consume read or write capacity
  • No Throttling Risk: Backups occur asynchronously from your main table operations
  • No Downtime Required: Both enabling PITR and taking backups occur without interruption

Restoration Performance

Restoration time depends on several factors:

  • Table Size: Larger tables take longer to restore
  • Index Configuration: Tables with many indexes take longer
  • Time Period: Restoring from more recent points is typically faster

Typical restoration times range from minutes for small tables to several hours for very large tables.

Best Practices for Using PITR

Follow these best practices to maximize the value of DynamoDB’s PITR feature:

1. Enable PITR Proactively

Don’t wait for a data loss incident to activate PITR. Enable it proactively for all critical tables.

Shell
# Script to enable PITR for multiple tablesfor table in Table1 Table2 Table3; do  aws dynamodb update-continuous-backups \    --table-name $table \    --point-in-time-recovery-specification PointInTimeRecoveryEnabled=truedone

2. Document Recovery Procedures

Create clear procedures for how and when to restore data:

  • Who is authorized to initiate restores
  • How to determine the correct restore point
  • Post-restoration validation processes
  • How to merge or reconcile data if needed

3. Implement Change Tracking

Track table changes with additional metadata to make restoration points easier to identify:

JavaScript
// Example: Add timestamp and change metadata to itemsconst updateParams = {  TableName: 'YourTable',  Key: { 'id': 'item123' },  UpdateExpression: 'SET #data = :newData, lastModified = :timestamp, modifiedBy = :user',  ExpressionAttributeNames: { '#data': 'data' },  ExpressionAttributeValues: {    ':newData': 'Updated value',    ':timestamp': new Date().toISOString(),    ':user': 'username'  }};

4. Regularly Test Restoration

Perform periodic restoration tests to ensure that:

  • Your team knows the restoration process
  • Recovery time objectives (RTOs) are being met
  • Restored data is usable and complete

5. Combine with Other Backup Strategies

Use PITR alongside:

  • On-demand backups for long-term retention
  • Cross-region replication for disaster recovery
  • Exports to S3 for analytical purposes

Common Recovery Scenarios

Here are common scenarios where PITR proves invaluable:

Scenario 1: Accidental Data Deletion

Text
Timeline:9:00 AM: Table has 10,000 valid records9:15 AM: Developer accidentally runs script that deletes 5,000 records9:20 AM: Issue discovered

Recovery Process:

  1. Identify the last known good state (9:14 AM)
  2. Restore the table to that point in time
  3. Validate that the restored table contains all expected records
  4. Update application configuration to use the restored table

Scenario 2: Bad Code Deployment

Text
Timeline:2:00 PM: New application version deployed2:00-3:00 PM: Application writes incorrect data to DynamoDB3:00 PM: Issue identified and fixed

Recovery Process:

  1. Restore the table to 1:59 PM (pre-deployment)
  2. Identify all records written since deployment
  3. Apply only the valid changes to the restored table
  4. Update application to use corrected data

Scenario 3: Compliance and Audit Requirements

Text
Timeline:March 1: Financial quarter endsApril 15: Auditor requests state of database as of March 31, 11:59 PM

Recovery Process:

  1. Use PITR to restore the table to March 31, 11:59 PM
  2. Keep the restored table separate from production
  3. Provide auditors with access to the point-in-time snapshot
  4. Delete the restored table after audit completion

Limitations and Considerations

While PITR is powerful, it has some limitations to be aware of:

1. Restoration Creates a New Table

PITR always creates a new table and cannot overwrite the original. This means:

  • You must update your application to point to the new table
  • You need sufficient capacity for both tables
  • The new table may have a different ARN and endpoint

2. Fixed 35-Day Retention Period

The 35-day retention period cannot be extended or shortened. For longer retention:

  • Schedule on-demand backups periodically
  • Export table data to S3 with lifecycle policies

3. Table Configuration Changes

The restored table will have:

  • The same provisioned throughput as the source table at restoration time
  • The same global and local secondary indexes
  • The same IAM policies

But will not maintain:

  • Auto scaling settings
  • CloudWatch alarms and metrics
  • Tags
  • Stream settings
  • Time To Live (TTL) settings

4. Regional Constraints

PITR backups exist only in the region where the table is located. For cross-region protection:

  • Enable global tables for active-active replication
  • Implement cross-region backup copying for on-demand backups

5. Cannot Selective Restore

PITR always restores the entire table; you cannot restore just specific items or attributes. For selective restoration:

Monitoring and Troubleshooting PITR

Proper monitoring helps ensure your PITR setup is working as expected.

CloudWatch Metrics to Monitor

The following CloudWatch metrics can help monitor your PITR status:

  1. SuccessfulRequestLatency for UpdateContinuousBackups operation
  2. ThrottledRequests for backup-related operations
  3. SystemErrors for backup operations

Setting Up PITR Status Alarms

Create a CloudWatch alarm to notify you if PITR becomes disabled:

Shell
aws cloudwatch put-metric-alarm \  --alarm-name PITRDisabledAlarm \  --metric-name PointInTimeRecoveryStatus \  --namespace AWS/DynamoDB \  --statistic Maximum \  --period 300 \  --threshold 1 \  --comparison-operator LessThanThreshold \  --dimensions Name=TableName,Value=YourTableName \  --evaluation-periods 1 \  --alarm-actions arn:aws:sns:region:account-id:your-sns-topic

Using AWS Config for Compliance

Use AWS Config rules to ensure PITR remains enabled for critical tables:

JSON
{  "ConfigRuleName": "dynamodb-pitr-enabled",  "Description": "Checks if PITR is enabled for DynamoDB tables",  "Scope": {    "ComplianceResourceTypes": [      "AWS::DynamoDB::Table"    ]  },  "Source": {    "Owner": "AWS",    "SourceIdentifier": "DYNAMODB_PITR_ENABLED"  }}

Common PITR Issues and Solutions

IssuePossible CauseSolution
Cannot enable PITRInsufficient IAM permissionsEnsure the IAM role has dynamodb:UpdateContinuousBackups permission
PITR shows as disabled unexpectedlyService disruption or manual changeRe-enable PITR and set up monitoring alerts
Restore taking too longVery large table sizePlan for longer restore times for large tables; consider table design optimization
Cannot see expected restore pointTime zone confusionEnsure you’re accounting for time zone differences in timestamps
Restored table missing featuresNon-transferable settingsManually reconfigure auto-scaling, alarms, and tags after restore

Real-World Use Cases

E-commerce Platform

An e-commerce platform uses PITR to protect against order data corruption:

Text
Use Case: During a high-traffic sales event, a buggy code deployment caused order status updates to be incorrect for a 45-minute period. Using PITR, they were able to:1. Restore the orders table to the point before the deployment2. Extract only the affected orders3. Correct the status for those specific orders4. Avoid losing any legitimate orders placed during the incident

Financial Services Application

A financial application uses PITR for regulatory compliance:

Text
Use Case: Banking regulations require maintaining the ability to reconstruct the exact state of transaction records at any point in time for the past 30 days. By enabling PITR:1. The application automatically meets this compliance requirement2. Auditors can request and receive point-in-time snapshots3. Discrepancies can be investigated by comparing states at different times

SaaS Platform

A multi-tenant SaaS platform uses PITR as part of their customer data protection strategy:

Text
Use Case: When a customer reported data inconsistencies after a third-party integration went wrong, the platform was able to:1. Restore just that customer's data to the pre-integration state2. Keep all other customer data current3. Re-run the integration with fixed parameters4. Avoid a full service restoration that would have affected all users

Conclusion

DynamoDB Point-In-Time Recovery provides a powerful safety net for your critical data. By continuously backing up your tables and enabling restoration to any point within the last 35 days, PITR helps protect against accidental deletions, application bugs, and even malicious actions.

Key takeaways:

  • Enable PITR proactively for business-critical tables
  • Understand the cost structure and performance implications
  • Create clear recovery procedures and test them regularly
  • Be aware of PITR limitations and plan accordingly
  • Combine PITR with other backup strategies for comprehensive protection

PITR represents a relatively small investment that provides substantial protection against potentially catastrophic data loss scenarios. For most production DynamoDB workloads, enabling this feature should be considered a standard best practice.

For more information on optimizing your DynamoDB implementation, check out our related articles:

Ready to simplify your DynamoDB development experience? Try Dynomate - our powerful GUI client that makes working with DynamoDB easier than ever.

All posts

What Is DynamoDB? AWS's NoSQL Database Explained

DynamoDB is AWS's serverless key-value store: single-digit millisecond reads at any scale. How partitions and keys work, what it costs, when to avoid it.

Reading time: 14 min

DynamoDB Best Practices: 10 Rules for Speed and Cost

Ten rules that decide whether DynamoDB runs fast and cheap or slow and expensive: access-pattern design, key cardinality, index restraint, TTL.

Reading time: 15 min

DynamoDB Indexes: LSI vs GSI and When to Use Each

An LSI shares the partition key and must exist from table creation. A GSI can be added later, at its own cost. Which to reach for, and what to project.

Reading time: 14 min