Unpopular opinion: on-demand should be the default capacity mode for most new DynamoDB tables.
You don't know your traffic yet. A wrong provisioned guess either throttles or wastes money.
Measure real usage first. Switch to provisioned once the load is steady and predictable.
5. Every index whose keys or projected attributes changed gets written too, and those writes cost capacity as well. If Streams are on, the change is recorded there.
Tip: ReturnValues UPDATED_NEW hands you the result without a second read.
4. You're billed for the larger of the item's size before and after the update, in 1 KB write units.
Change one tiny attribute on a 300 KB item and you still pay for about 300 KB.
3. The UpdateExpression runs: SET, REMOVE, ADD and DELETE, applied atomically to that one item.
ADD on a number gives you a counter without a read-modify-write round trip.
2. Your ConditionExpression, if you sent one, is checked against the current item.
If it's false you get ConditionalCheckFailedException and nothing is written. The failed write still consumes write capacity.
1. DynamoDB finds the item by its full primary key.
If no item has that key, UpdateItem creates one. It's an upsert unless you add a condition like attribute_exists(PK).
Before you import a CSV into a prod DynamoDB table:
1. Check every row has the key attributes
2. Map types (CSV has none)
3. Decide what a duplicate key does
4. Pace writes for live traffic
Dynobase's import wizard previews types, key coverage and conflict handling first.
What's the first DynamoDB habit you break when a new teammate joins?
Mine: assuming UpdateItem only updates existing items. Without a condition, it creates the item if the key is missing.
What's yours?
Unpopular opinion: every production DynamoDB table should have deletion protection on.
It's free. It's one setting. And it turns "oops, wrong account" into an error message instead of an incident.
A prod table shouldn't be one API call away from gone.
35 days.
That's the longest window DynamoDB point-in-time recovery can restore from, down to the second.
The catch: PITR is off until you turn it on, and a restore always lands in a new table. Enable it before the bad deploy, not after.
Stages of DynamoDB "we'll fix the key later":
1. Ship with a busy-friendly PK
2. Traffic grows
3. One hot key
4. Throttles in prod
5. "We'll shard next sprint"
6. Next sprint ships features instead
Which stage are you stuck in?
Myth: you can add a local secondary index later.
You can't. LSIs are chosen at CreateTable. After that, the only option is a new table (or a GSI, which is a different tool).
Need another sort-key pattern on an existing table? Plan a GSI — or migrate.
Safer order when adding a DynamoDB GSI:
1. Confirm the Query pattern needs it
2. Create the GSI (existing items start backfilling)
3. Wait until IndexStatus is ACTIVE
4. Only then route traffic to it
CREATING ≠ ready. Queries on a still-building index fail or miss items.
10 GB.
Max size of one DynamoDB partition that holds a local secondary index.
An LSI lives on the same partition as the base item. Grow past ~10 GB and writes that enlarge it start failing.
Watch partition size, not just RCU/WCU.