DynamoDB ResourceNotFoundException

TL;DR — DynamoDB can't find the table (or index) you named in the region/account your client is pointed at. Check for a typo in the table name, the wrong region, or credentials for a different account. It's almost never that the table is really gone.

What it means

ResourceNotFoundException: Requested resource not found
ResourceNotFoundException: Cannot do operations on a non-existent table

The operation targeted a table or index that doesn't exist from the perspective of this client — the combination of table name + AWS region + account (credentials). All three have to line up.

Why it happens

  • Region mismatch — the table is in us-east-1 but the client defaults to us-west-2 (or no region is set, so the SDK picks a different default).
  • Wrong table name — a typo, wrong case (names are case-sensitive), or an environment-prefixed name (prod-Orders vs Orders).
  • Wrong account — the credentials resolve to a different AWS account than the one that owns the table.
  • Querying an index that doesn't exist or isn't ACTIVE yet (a GSI is still backfilling).
  • The table really was deleted, or you're pointed at DynamoDB Local, which starts empty.

How to fix it

  1. Pin the region explicitly on the client and confirm it matches where the table lives.
  2. Verify the exact table name — list tables in that region (aws dynamodb list-tables --region <r>) and copy the name verbatim.
  3. Confirm the credentials resolve to the owning account (aws sts get-caller-identity).
  4. Check the index name + status if the call uses IndexName (DescribeTable → the GSI must be ACTIVE).

Example

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

// Pin the region so the client can't silently target the wrong one:
const client = new DynamoDBClient({region: 'us-east-1'});

Lavora con DynamoDB senza la Console

DynoTable è un client desktop veloce per DynamoDB — sfoglia le tabelle, esegui query in stile SQL e modifica gli Item localmente.