Operations & Cost

Modeling puts data in the table. Operating it means consistent writes, change feeds, expiry, capacity bills, multi-Region survival and recovery. Get those right and you can trust DynamoDB in production; get them wrong and it throttles at 2 a.m.

This section walks one running scenario: the audit log for a multi-tenant SaaS, the immutable "who did what, when" records enterprise buyers ask for. One table, partitioned per tenant:

PKSKactoractionip
TENANT#acmeEVENT#2026-06-24T09:14Z#a1USER#88login.success203.0.113.7
TENANT#acmeEVENT#2026-06-24T09:15Z#a2USER#88invoice.export203.0.113.7
TENANT#globexEVENT#2026-06-24T09:15Z#b9USER#12role.granted198.51.100.4

Most guides add one operational concern to this same table.

What this section teaches you to do

  • Use transactions where all-or-nothing writes matter and know the cancel reasons AWS returns.
  • Wire DynamoDB Streams and TTL for append-only audit retention without a nightly delete job.
  • Choose on-demand vs provisioned capacity from your traffic's average utilization.
  • Plan global tables and PITR recovery: what each recovers, and how far back.

Reading order

  1. Cost model and SQL scans: how scan-shaped reads show up on the bill before you operate the audit table.
  2. Transactions: TransactWriteItems for an audit event plus its per-tenant counter; idempotency tokens.
  3. Streams: stream consumers that ship audit events to SIEM or warehouse without polling the table.
  4. TTL: expire old EVENT# rows automatically; epoch seconds on the TTL attribute.
  5. On-demand vs provisioned: pay per request vs provisioned capacity, the utilization break-even, and a worked bill.
  6. On-demand throughput, measured: the write and read ceilings of a new on-demand table, and how they grew under load.
  7. Auto scaling: provisioned mode scaling policies.
  8. Throttling: the four throttling causes, the exception and metric that name each, and the fix for each.
  9. Table size and item count: DynamoDB's six-hour DescribeTable estimates vs an exact Scan count.
  10. Global tables: multi-Region replication for the audit log; last-writer-wins conflicts and the MREC/MRSC consistency modes.
  11. Backup and PITR: continuous backups and point-in-time restore windows.
0 of 12 readQuiz
DynamoDB Cost Model: Why SQL Can Hide the Bill
Why SQL over DynamoDB can hide the bill: how joins, arbitrary WHERE filters and aggregates compile to Scans, and what one full Scan costs.
Intermediate4 min read
DynamoDB Transactions: All-or-Nothing Writes Across Items
DynamoDB transactions with TransactWriteItems — up to 100 all-or-nothing actions, a 4 MB limit, double write capacity, and how conflicts cancel.
Advanced9 min read
DynamoDB Streams: React to Every Item Change
DynamoDB Streams: the 24-hour change log, StreamViewType, per-item ordering, Lambda triggers, and the Kinesis path to keep changes longer or archive them in S3.
Advanced9 min read
DynamoDB TTL: How Expiring Items Get Deleted
DynamoDB TTL auto-deletes items once a Unix-epoch timestamp attribute passes, typically within a few days, and those deletes cost no write capacity.
Intermediate6 min read
DynamoDB On-Demand vs Provisioned Capacity
DynamoDB On-Demand vs Provisioned capacity: pay-per-request against provisioned throughput, the ~29% utilization break-even, and a worked monthly bill.
Intermediate8 min read
DynamoDB On-Demand Throughput: Measured
DynamoDB on-demand throughput, measured live: a fresh table's 4,000 writes/s ceiling, 12,762 reads/s with no throttle, and how the ceiling grew under load.
Intermediate5 min read
How to Set Up DynamoDB Auto Scaling
Set up DynamoDB auto scaling on provisioned capacity: console and CLI steps, picking target utilization and min/max, and the limits that still throttle.
Intermediate9 min read
DynamoDB Throttling and How to Fix It
Why DynamoDB throttles: the four documented causes, the 3,000 read and 1,000 write units per partition limit, the on-demand ramp, and the fix for each.
Intermediate10 min read
DynamoDB Table Size and Item Count
Get a DynamoDB table size and item count from the free DescribeTable estimate, which lags up to six hours, or an exact count with Scan Select COUNT.
Beginner5 min read
DynamoDB Global Tables: Multi-Region Replication Explained
DynamoDB Global Tables: multi-Region active-active replication, last-writer-wins conflicts, the MREC and MRSC consistency modes, RPO, and the 99.999% SLA.
Advanced7 min read
DynamoDB Backup and Point-in-Time Recovery Guide
DynamoDB backup and point-in-time recovery: on-demand snapshots vs continuous PITR, the 1-to-35-day window, the restore commands, and what to re-apply after.
Intermediate7 min read
Knowledge checkTake the quiz
Check what you’ve learned in this section.

On-demand write request units round up per 1 KB, so a 1.1 KB audit event bills two WRUs per write, not one.

At 100 sustained 1 KB writes per second, writes alone come to about $164.25 per month at us-east-1 on-demand list price (730-hour month), before GSIs or streams. The pricing calculator prices your tenant count and event rate.

TTL deletes consume no write capacity in the Region where the item expires; on a global table, each replicated delete bills as a write in every other Region. They are also asynchronous, typically within a few days of expiry.

When a deletion must happen on time and be provable, delete the items yourself with DeleteItem (or BatchWriteItem) at the deadline and log it, with TTL as the backstop.

Until an expired item is gone, filter it out at read time on the TTL attribute.

Price your steady audit append in the pricing calculator. For bursts, on-demand absorbs up to double the previous peak instantly; pre-warm anything bigger (on-demand throughput).

See it in DynoTable

Download DynoTable and inspect the audit table as you read. The Settings button in a table's toolbar opens the Table settings dialog: its Overview shows key structure, GSIs, and DynamoDB's size and item-count estimates.

The TTL converter turns calendar dates into epoch seconds for TTL attributes (TTL expects seconds, not milliseconds).

The same dialog switches capacity mode, edits RCU/WCU, sets TTL, turns point-in-time recovery on or off, and adds or removes global-table replicas.

Backups, restores and Streams configuration stay in the AWS console or your infrastructure-as-code.