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

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.
Other Common DynamoDB Errors (with Solutions)
- dynamodb unknown error
- could not connect to the endpoint URL dynamodb
- why is the GSI dynamodb not showing item count
- DynamoDB No Provisioned Throughput specified for the table
- ImportError: No module named boto3 (DynamoDB)
- DynamoDB no attribute schema defined
- DynamoDB No Regionendpoint Or Serviceurl Configured
- DynamoDB Network Error: self signed certificate in chain
- DynamoDB cannot do operations on a non-existent table
- dynamodb cannot assign requested address
- dynamodb no range key value present
- DynamoDB sorting is not supported for scan expressions
- DynamoDB parameter validation failed
- DynamoDB scan filter expression not working
- DynamoDB ValidationException: Query condition missed key schema element
Dynobase is a Professional GUI Client for DynamoDB
Start your 7-day free trial today