dynobase-icon
Dynobase

Error: dynamodb consistent reads are not supported on global secondary indexes

Rafal Wilinski

Answered by Rafal Wilinski

Last updated: October 23rd, 2026

Solution

“Consistent reads are not supported on global secondary indexes” means the request set ConsistentRead to true while targeting a GSI. Set it to false or omit it. Waiting for the index to catch up does not make a strong-read request valid.

import { DynamoDBClient } from "@aws-sdk/client-dynamodb";
import { DynamoDBDocumentClient, QueryCommand } from "@aws-sdk/lib-dynamodb";
const db = DynamoDBDocumentClient.from(new DynamoDBClient({ region: "us-east-1" }));
const page = await db.send(new QueryCommand({
  TableName: "Orders",
  IndexName: "status-index",
  KeyConditionExpression: "#status = :status",
  ExpressionAttributeNames: { "#status": "status" },
  ExpressionAttributeValues: { ":status": "OPEN" },
  ConsistentRead: false
}));

This example assumes status is the GSI partition key. GSI propagation is asynchronous, so a just-written item may not appear immediately. There is no fixed wait that guarantees visibility.

If you know the full base-table key, use GetItem with ConsistentRead=true there. Fetching base-table items after a GSI query gives current values for the keys found, but it cannot recover keys the lagging index omitted. For access patterns requiring complete strongly consistent results, design a base-table query or, where appropriate, an LSI created with the table. Streams are asynchronous and do not turn a GSI into a strongly consistent index.

See GSI consistency and AWS documentation.

Dynobase is a Professional GUI Client for DynamoDB

Start your 7-day free trial today

Product Features

Download
/
Pricing
/
Member Portal
/
Privacy
/
EULA
/
Twitter
© 2026 Dynobase
+
Still using AWS DynamoDB Console?
Try Dynobase to accelerate your DynamoDB workflow. Start your 7-day free trial today.