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 ValidationExceptionclient-side and not retryable until the name/status is right.

Why it happens

  • Typo or wrong case — index names are case-sensitive; GSI1gsi1.
  • Index belongs to a different table — you copied the IndexName from another table's schema.
  • The GSI isn't ACTIVE yet — a newly created global secondary index can't be queried until its status goes CREATING → 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.db that predates the index; recreate it.

How to fix it

  1. List the real index names and status:
    aws dynamodb describe-table --table-name <Table> \
      --query "Table.GlobalSecondaryIndexes[].{Name:IndexName,Status:IndexStatus}"
  2. Copy the name verbatim into IndexName — match case exactly.
  3. Wait for ACTIVE. If the GSI is CREATING, the query only works once backfill finishes (DescribeTable shows IndexStatus).
  4. Confirm region + account with aws sts get-caller-identity and pin the client's region.
  5. 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.

Travaille avec DynamoDB sans la Console

DynoTable est un client de bureau rapide pour DynamoDB — parcours les tables, exécute des requêtes de style SQL et édite les items en local.