Fundamentals

You model DynamoDB like a spreadsheet with columns, then discover there is no schema beyond the key, no ALTER TABLE, and the primary key is the address on disk. Every access pattern you sketch later either fits that address or fights it.

This section covers the typed-value model, how items group into collections under one partition key, and why consistency choices show up on every read API.

Attributes are optional per item, types matter at the API boundary, and a composite key sets the physical sort order of your data.

What this section teaches you to do

  • Read any DynamoDB item and name each attribute's type without guessing from JSON.
  • Explain why a Query returns one item collection and what partition key + sort key control on disk.
  • Size an item before you denormalize and know when a 400 KB hard limit will reject the write.
  • Pick strong vs eventual consistency for a read and predict what stale data costs in your UI.

Reading order

Work through the guides in this order. The composite primary key (step 7) comes before item collections (step 8), which group items under its partition key.

  1. When to use DynamoDB: the fit/no-fit decision before you commit storage and migration cost to a key-value design.
  2. Data types: S, N, B, sets, lists, and maps; the type tags every API call must respect.
  3. JSON marshalling: how plain JSON becomes typed DynamoDB attributes and where silent coercion bites.
  4. Item size limit: the 400 KB cap, what counts toward it, and patterns that blow past it when you pack children inline.
  5. Limits: the item, key, batch, transaction and index limits, with the live service's error for each probed one, and the quotas you can raise.
  6. Item-based actions: Get, Put, Update and Delete by full primary key; why PutItem replaces the whole item and UpdateItem doesn't.
  7. Composite primary key: why the partition key + sort key pair must be unique, and how the sort key turns it into range reads.
  8. Item collections: all items sharing a partition key; the unit a single Query can walk in sort order.
  9. Consistency: strong vs eventual on the base table; what you can and cannot ask for on a GSI.
0 of 10 readQuiz
When to Use DynamoDB (and When Not To)
When to use DynamoDB and when not to. The access-pattern, scale and cost signals that favor it over a relational database, and what to pair it with otherwise.
Beginner10 min read
DynamoDB Data Types: Every Type, with Examples
DynamoDB's ten data types: scalars (S, N, B, BOOL, NULL), documents (M, L) and sets (SS, NS, BS), how they look in DynamoDB JSON, and which can be a key.
Beginner7 min read
DynamoDB JSON & Marshalling
DynamoDB JSON and marshalling. Why every value is wrapped in a type tag, how it differs from plain JSON, and how to convert between the two in code.
Beginner7 min read
The DynamoDB Item Size Limit (400 KB)
The DynamoDB 400 KB item size limit, what counts toward it, what a big item costs, and how to split, compress or offload an item that keeps growing.
Beginner7 min read
DynamoDB Limits and Quotas, Verified on the Live Service
The DynamoDB limits and quotas that shape designs, which ones you can raise, the way around each, and the live service's verbatim error for the probed ones.
Intermediate13 min read
DynamoDB Item-Based Actions
DynamoDB item-based actions: GetItem, PutItem, UpdateItem and DeleteItem each address one item by its full primary key, and differ from Query and Scan.
Beginner7 min read
DynamoDB Composite Primary Key: Partition + Sort Key
A DynamoDB composite primary key is a partition key plus a sort key. The pair must be unique, and the sort key lets one Query read a sorted range.
Beginner9 min read
DynamoDB Item Collections
What a DynamoDB item collection is (every item sharing a partition key), why it's the unit of one Query, and the 10 GB limit an LSI adds.
Beginner8 min read
DynamoDB Strongly vs Eventually Consistent Reads
DynamoDB strongly consistent vs eventually consistent reads: what each guarantees, the 2× read cost of ConsistentRead, and why a GSI is eventual-only.
Intermediate7 min read
Knowledge checkTake the quiz
Check what you’ve learned in this section.

A composite key on VEH#V-7741 with sort keys META and TS#… lets one Query return a vehicle's profile and its readings in time order.

Misunderstand item collections and you either Scan the table or fetch each row with GetItem. Both scale poorly, and both show up on the bill.

Hands-on in DynoTable

Open a live table in DynoTable and inspect keys in the grid. The table's Overview shows the primary key and every secondary index, so you can see how items group before you write a query.

Paste a sample item into the free item size calculator to measure it against the 400 KB limit. Embedded children grow every write: past 1 KB, each extra KB costs another WCU, while reads round at 4 KB.

The visual filter builder adds hash and range key conditions with type-aware operators, so you practice Query against a real collection instead of hand-writing JSON. Free read-only access covers queries, PartiQL SELECT and exports.

Writes need a trial or a paid license. Download DynoTable and run these primitives against your own tables as you read.