The table does not have the specified index
TL;DR — The IndexName in your Query/Scan doesn't exist on that table (from this client's region + account), is misspelled, or the GSI is still CREATING and not queryable yet. Confirm the exact index name and status with DescribeTable, then fix the call.
What it means
ValidationException: The table does not have the specified index: <IndexName>You asked DynamoDB to Query or Scan a specific secondary index by name, and the table (as this client sees it) has no index by that name in a usable state. It's an HTTP 400 ValidationException — client-side and not retryable until the name/status is right.
Why it happens
- Typo or wrong case — index names are case-sensitive;
GSI1≠gsi1. - Index belongs to a different table — you copied the
IndexNamefrom another table's schema. - The GSI isn't
ACTIVEyet — a newly created global secondary index can't be queried until its status goesCREATING → ACTIVE(it backfills first). - Wrong region/account — the client points at a region where the table (or its index) doesn't exist (the same lineup issue as a missing table).
- DynamoDB Local drift — a stale local
shared-local-instance.dbthat predates the index; recreate it.
How to fix it
- List the real index names and status:
aws dynamodb describe-table --table-name <Table> \ --query "Table.GlobalSecondaryIndexes[].{Name:IndexName,Status:IndexStatus}" - Copy the name verbatim into
IndexName— match case exactly. - Wait for
ACTIVE. If the GSI isCREATING, the query only works once backfill finishes (DescribeTableshowsIndexStatus). - Confirm region + account with
aws sts get-caller-identityand pin the client'sregion. - On DynamoDB Local, delete the local db file and re-run your table/index setup so the index exists locally.
Working across several tables and indexes? The DynoTable desktop app lists each table's GSIs and their status, so you can pick an index that actually exists — and is ACTIVE — instead of guessing the name.
Related errors
- ResourceNotFoundException — the whole table (not just an index) can't be found.
- Query key condition not supported — the index exists but your key condition is wrong for it.
- Learn: GSI vs LSI · GSIs are eventually consistent