Intermediate7 min read

DynamoDB Strongly vs Eventually Consistent Reads

You update an item, immediately read it back, and get the old value. The write succeeded, and a moment later the same read returns the new value.

Nothing is broken: you've hit DynamoDB's default eventually consistent read, and you can opt out of it per request, at twice the read cost.

What is the difference between strongly and eventually consistent reads in DynamoDB?

  • Eventually consistent (the default). May briefly return stale data right after a write. Cheapest read mode.
  • Strongly consistent. Always reflects every write that succeeded before the read. Opt in per request with ConsistentRead=true.
  • Strong reads cost 2× eventual. A strongly consistent read consumes twice the read capacity of an eventually consistent one for the same data.
  • Not everywhere. You get strong reads on the base table and on a Local Secondary Index. A Global Secondary Index is eventual-only, with no opt-in.
  • Default to eventual. Reach for strong only when reading your own just-written data and stale-by-a-moment would be wrong.

DynoTable reads eventually consistent, the DynamoDB default (details).

The problem: a read that doesn't see the latest write

Say you run user accounts. A user changes their notification email, your app writes the update, and the confirmation screen immediately re-reads the profile.

With the default read mode, that re-read can land on a replica that hasn't received the change yet, so the user sees their old email and assumes the save failed.

AWS doesn't publish a number for that window; its docs say only that a repeated read "after a short time" should return the newer item. That isn't good enough for a read-after-write confirmation.

The fix is one flag on the read-back. You just wrote the item, so you know its key:

import {DynamoDBClient, GetItemCommand, UpdateItemCommand} from '@aws-sdk/client-dynamodb';

const client = new DynamoDBClient({});
const Key = {pk: {S: 'USER#204'}};

await client.send(
  new UpdateItemCommand({
    TableName: 'Accounts',
    Key,
    UpdateExpression: 'SET email = :e',
    ExpressionAttributeValues: {':e': {S: 'ada@example.com'}}
  })
);

// Strongly consistent: reflects the update above.
const {Item} = await client.send(
  new GetItemCommand({TableName: 'Accounts', Key, ConsistentRead: true})
);

From the CLI, the same read is aws dynamodb get-item --consistent-read. If the screen only needs what you just wrote, skip the second read: set ReturnValues: 'ALL_NEW' on the UpdateItem and it returns the updated item (ReturnValues).

Why eventual consistency happens

DynamoDB keeps each partition as replicas in separate Availability Zones, one of them the leader. A write is acknowledged once two of the three replicas have it in their logs; the third catches up shortly after (USENIX ATC 2022 paper).

"Only the leader replica can serve write and strongly consistent read requests", the paper says, while any replica can serve an eventually consistent read. So an eventual read can hit the replica that hasn't caught up.

quorum, acknowledgedcatches up shortly aftermay hit the lagging replicaWrite: new emailLeader replicaReplica 2Replica 3Strongly consistent readEventually consistent read

That replication lag is the whole difference in behavior. The price differs too: "Eventually consistent reads are half the cost of strongly consistent reads" (AWS docs).

The replication race

Write v2 lands on the primary at 0 ms; the lagging replica catches up at the marker. Drop your read anywhere on the timeline, pick the read type, and see what comes back.

0 ms — Write v21,000 ms
Write v2 (0 ms)replica caught up (120 ms)your read (100 ms)
100 ms

Each write propagates with a different fixed lag — writing again moves the catch-up marker.

Your read at 100 ms returns v1 — the old value. It landed on the lagging replica, which only catches up at 120 ms. Cost: 1× RCU.

Read atRead typeReturnsServed byRCU cost
50 msEventually consistentv1 (stale)the lagging replica1×
50 msStrongly consistentv2 (fresh)the partition leader2×
200 msEventually consistentv2 (fresh)the lagging replica1×
200 msStrongly consistentv2 (fresh)the partition leader2×
600 msEventually consistentv2 (fresh)the lagging replica1×
600 msStrongly consistentv2 (fresh)the partition leader2×

A teaching model: the lag is drawn long enough to see, and "an eventual read before catch-up returns the old value" is made a fixed rule here. In production the window is typically well under a second and whether a read hits the lagging replica is probabilistic. A strongly consistent read always reflects every committed write — at twice the read capacity.

The cost, made concrete

Reads are metered in 4 KB blocks: Read Capacity Units (RCU) on a provisioned table, read request units on demand. One unit buys one strongly consistent read or two eventually consistent reads of up to 4 KB.

Two reads of the same 6 KB item on the base table:

Mode4 KB blocksRCU consumedWhen to use
Strongly consistent2 (6 KB rounds up)2 RCUConfirmation screens after your own write
Eventually consistent21 RCUDashboards, lists, analytics

So flipping ConsistentRead=true on a hot read path doubles its read bill: at 1,000 such reads per second, 2,000 units per second instead of 1,000.

Model it for your own item sizes in the pricing calculator before you make strong reads your default.

Where strong reads are (and aren't) available

Read againstStrongly consistent?
Base tableYes, opt in with ConsistentRead=true
Local Secondary Index (LSI)Yes, same opt-in as the base table
Global Secondary Index (GSI)No, eventual only, no override

A GSI maintains its own copy of the data, replicated from the base table asynchronously, so it can never offer a strong read.

If an access pattern needs read-after-write and you planned to serve it from a GSI, read the item back from the base table by its primary key with ConsistentRead: true.

An LSI supports strong reads too, but only if you declared it when you created the table; you can't add one later.

BatchGetItem takes ConsistentRead per table, and every key for that table shares it. One call can read a profile table strongly and a settings table eventually; in a single-table design, both take one setting. It never reads an index.

Consistency across Regions

A global table defaults to multi-Region eventual consistency (MREC): other Regions receive a change "typically within a second".

A strong read is strong only against its own Region's replica, so a write in us-east-1 isn't guaranteed to be visible to a strong read in eu-west-1 yet.

For read-after-write across Regions, send the read to the Region that took the write; that works on any global table.

Or create the table in multi-Region strong consistency (MRSC) mode, where "strongly consistent read operations on any MRSC replica always return the latest version of an item" (AWS docs).

MRSC is chosen at creation and can't be changed later. It needs exactly three Regions (three replicas, or two plus a witness), and an existing table must be empty to convert. It supports neither TTL nor LSIs, and it rejects transactions: TransactWriteItems and TransactGetItems return an error on an MRSC replica.

DynoTable defaults

DynoTable's table reads (grid queries, scans and PartiQL SELECT) are eventually consistent, the DynamoDB default, and so is the refresh after a commit. The app has no switch for strongly consistent reads.

When you need one, use the CLI's get-item --consistent-read, or emit SDK code with ConsistentRead set from the query builder for services that need read-after-write guarantees.

Pitfalls and next steps

  • Don't make strong reads the default. Most reads tolerate a briefly stale value; paying 2× everywhere is wasted spend.
  • Don't expect read-after-write from a GSI. It's eventual by design; see why a GSI is eventually consistent.
  • Transactions read strongly. TransactGetItems always returns the latest committed values, except on an MRSC global table, which rejects transactions; see DynamoDB transactions.
  • Consistency interacts with capacity. The 2× multiplier ties straight into on-demand vs provisioned cost planning.

Download DynoTable to see each table's LSIs and GSIs in its Overview, so you know which reads can be strong before you wire ConsistentRead into a service.

By Dmitriy · Updated