DynamoDB Operations: Capacity, Backups, and Recovery
Choose a DynamoDB capacity mode, diagnose throttling, and plan backup and recovery steps with current AWS guidance for your workload.
Use this guide to choose capacity, diagnose throttling, handle index and stream behavior, and rehearse table or regional recovery. For keys and access patterns, start with the DynamoDB data-model guide.
DynamoDB Operations: Capacity, Backups, and Recovery
This guide covers operating a DynamoDB table after its keys and access patterns are chosen. For table and index design, start with Amazon DynamoDB: Scalable NoSQL with Predictable Performance. AWS documentation cited here was checked on 2026-11-04; review current service guidance for your Region and workload before setting limits or recovery objectives.
Choose capacity for the workload
DynamoDB offers provisioned and on-demand capacity modes. Provisioned mode lets you set read and write capacity for a table and its global secondary indexes (GSIs). Auto scaling adjusts provisioned capacity toward a target utilization. It reacts to observed usage, so it should not be treated as an instant buffer for an unexpected surge. Use recent traffic history to set minimums and maximums, then test the limits against expected peaks. See AWS’s guides to DynamoDB auto scaling and evaluating auto-scaling settings.
On-demand mode removes the need to provision read and write units in advance and bills by requests. It can suit workloads whose volume is difficult to forecast. Hot key ranges, configured maximum throughput, and account quotas can still throttle requests. Check AWS’s current on-demand capacity guidance and service quotas before setting a cap or planning a launch.
Illustrative workload: Suppose an orders table has a predictable baseline and a scheduled batch that increases writes. Provisioned capacity with auto scaling may fit if the team can measure the baseline, test the batch peak, and set safe bounds. If a new feature has highly variable traffic, on-demand may simplify the initial capacity choice. Compare measured consumption and the current Region’s prices before switching modes; the break-even depends on the workload.
Diagnose throttling before changing capacity
Capture the throttling reason and affected resource ARN to identify whether the table or an index is constrained, whether the operation is a read or write, and what kind of limit was reached. AWS’s throttling diagnosis workflow maps these reasons to CloudWatch metrics and next steps.
Use this sequence during an incident:
- Identify the affected table or GSI from the exception details.
- Compare throttling with consumed-capacity and request metrics for that resource.
- For key-range throttling, use CloudWatch Contributor Insights to find hot keys or skewed access patterns.
- Check whether a GSI write, scan, batch job, or traffic change explains the timing.
- Fix the cause: adjust capacity bounds, reduce or spread concentrated traffic, revisit inefficient operations, or change the access pattern with a data-model review.
- Keep retries bounded and use backoff. Retry only the unprocessed items from batch operations; avoid tight retry loops that add load while the table is constrained.
AWS SDKs include retry behavior for throttling and transient errors. Review the SDK’s retry mode and application-level deadline, and make retried business operations safe to repeat. Retries can smooth brief contention; they do not fix sustained under-capacity or a hot key. AWS documents error handling and retry behavior and CloudWatch throttling metrics.
For table-wide alert design and dashboards, see Database Monitoring. DynamoDB-specific alarms should distinguish table and index throttling so a GSI issue is not mistaken for a base-table capacity problem.
Operate GSIs separately from their base tables
A GSI adds a query path to monitor and capacity to manage. In provisioned mode, its read and write capacity settings are separate from the base table. Writes to the table also update affected GSIs; if an index cannot keep up, DynamoDB can throttle base-table writes through GSI back-pressure. Check the index’s own metrics and throttling reason before increasing table capacity. AWS describes these behaviors in its GSI capacity guidance and GSI back-pressure guide.
Creating a GSI on a live table triggers a backfill. Before an operationally important change, review the proposed key distribution, watch index-build progress and base-table write throttles, and schedule the change when traffic can tolerate it. Stop the index build if it is hurting production writes. AWS lists relevant signals, including OnlineIndexPercentageProgress, in its online GSI operations guide.
Monitor Streams and TTL consumers
DynamoDB Streams records item changes and can trigger AWS Lambda. A stream record appears once in the stream, but a Lambda consumer can process it more than once when an invocation is retried. Make the handler idempotent, track processing errors and IteratorAge, and decide how failed records will be recovered. The AWS Streams and Lambda best practices explain the delivery distinction; the Lambda metric guide defines IteratorAge. Stream retention is limited, so send events to a durable destination if the application needs a longer audit history; see the DynamoDB Streams guide for current behavior.
TTL removes expired items asynchronously. An item whose expiration timestamp has passed can remain in reads until the background deletion occurs. If the application must treat an expired record as invalid immediately, filter or conditionally reject it based on the expiration attribute. TTL deletions can also appear in Streams, which is useful for cleanup or archival workflows. See AWS’s guidance on Time to Live and working with expired items.
Back up and rehearse table recovery
On-demand backups preserve a table snapshot. Point-in-time recovery (PITR) continuously backs up table data within its configured recovery window. A full restore creates a new table, leaving the source available while you validate recovery. For targeted unwanted writes inside the PITR window, AWS also documents an in-place rollback using an incremental export and a correction job. See the backup and restore guide and in-place rollback procedure for current options and Region availability.
Choose the protection plan from your recovery objectives. PITR helps recover from accidental writes or deletes; on-demand backups give named restore points for planned changes or retention needs. AWS Backup can manage backup plans and cross-Region copies when the recovery design needs them. Backup storage and cross-Region copies can add costs; review current DynamoDB pricing for your Region.
Rehearse a restore before you need one:
- Choose a recovery point and restore it to a new table.
- Validate expected records and application invariants against the restored data.
- Review or reapply operational settings, including capacity scaling, Streams, TTL, PITR, deletion protection, IAM and resource policies, tags, and alarms.
- Update infrastructure-as-code and application configuration to reference the restored table.
- Route a controlled test to the restored table, confirm reads and writes, and keep the original until recovery is accepted.
AWS’s PITR recovery procedure lists table settings and integrations to review after restoration. Record who approves the cutover and how to reverse it in the team’s recovery runbook.
Plan multi-Region recovery separately
Global Tables replicate live table data between Regions. They help an application use replicas in more than one Region, but they are not a backup: unwanted writes and deletes can also replicate. AWS says PITR settings are not replicated with Global Tables, so enable and verify recovery protection on each replica. See AWS’s Global Tables design guidance and DynamoDB disaster recovery strategies.
For regional failover, application routing is part of the recovery plan. Confirm which replica is serving traffic, monitor the ReplicationLatency metric, validate the data and write path, and define how to return traffic after recovery. AWS states that Global Tables replication latency has no SLA, so set recovery objectives around measured behavior and rehearse the failover and failback. For replication concepts beyond DynamoDB, see Database Replication.
Operations checklist
- Capacity mode and scaling bounds are based on observed workload and tested peaks.
- Throttling alarms and dashboards distinguish table, GSI, and key-range causes.
- Retry behavior uses backoff, respects application deadlines, and is safe to repeat.
- GSI backfills are monitored and have a production stop condition.
- Stream consumers are idempotent, and retention meets the recovery or audit need.
- TTL-dependent reads handle records that are expired but not yet deleted.
- PITR or on-demand backups match the recovery objective and are tested by restore.
- Each Global Tables replica has its own backup and recovery plan.
Conclusion
DynamoDB manages infrastructure; teams choose capacity, handle retries and index changes, and prepare recovery. Use AWS metrics to find the constrained resource, then rehearse restore and regional failover while the system is healthy. For keys and access-pattern design, return to the DynamoDB data-model guide.
Category
Related Posts
Amazon DynamoDB Data Modeling: Start with Access Patterns
Design DynamoDB tables from concrete access patterns with a worked orders example, a global secondary index, capacity estimates, and a throttling failure.
Operating Apache Cassandra: Repair, Backups, and Compaction
Operate Apache Cassandra 5.0.9 with workload-aware repair and compaction, tested backups, practical monitoring signals, and a safe incident workflow.
NoSQL Databases: Document, Key-Value, Column-Family, Graph
Explore NoSQL database types, CAP theorem implications, and when to choose MongoDB, Cassandra, DynamoDB, or graph databases over relational systems.