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 tableThe 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-1but the client defaults tous-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-OrdersvsOrders). - 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
ACTIVEyet (a GSI is still backfilling). - The table really was deleted, or you're pointed at DynamoDB Local, which starts empty.
How to fix it
- Pin the region explicitly on the client and confirm it matches where the table lives.
- Verify the exact table name — list tables in that region (
aws dynamodb list-tables --region <r>) and copy the name verbatim. - Confirm the credentials resolve to the owning account (
aws sts get-caller-identity). - Check the index name + status if the call uses
IndexName(DescribeTable→ the GSI must beACTIVE).
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'});Related errors
- ResourceInUseException — the opposite: the table already exists.
- Missing region in config
- The security token is invalid