Value provided in ExpressionAttributeNames unused in expressions

TL;DR — You declared a name placeholder in ExpressionAttributeNames (e.g. #status) that no expression references. DynamoDB requires every declared alias to be used in a KeyConditionExpression, FilterExpression, UpdateExpression, ConditionExpression, or ProjectionExpression. Remove the unused alias — or fix the expression that was supposed to reference it.

What it means

ValidationException: Value provided in ExpressionAttributeNames unused in
expressions: keys: {#status}

ExpressionAttributeNames is a substitution map for attribute-name aliases (needed for reserved words or names with special characters). DynamoDB enforces a strict two-way contract: every alias you use in an expression must be declared, and every alias you declare must be used. A leftover, unreferenced entry triggers this HTTP 400 ValidationException. It's client-side and not retryable until the map matches the expressions.

Why it happens

  • A stale alias left after editing an expression — you removed #status = :s from the expression but forgot to delete #status from the names map.
  • A generated map that over-declares — a mapping layer emitted aliases for every attribute even ones the final expression doesn't touch.
  • The alias is in the values map, not names — you meant :status (a value) but declared #status (a name).
  • A typo mismatch — the expression uses #stat while the map declares #status, so #status is technically unused.

How to fix it

  1. Delete the unused alias the message names from ExpressionAttributeNames.
  2. Keep the map in lock-step with the expressions — declare a #name only when an expression actually references it.
  3. Check for a name-vs-value mix-up#-aliases live in ExpressionAttributeNames, :-placeholders in ExpressionAttributeValues.
  4. Regenerate the request so names, values, and expression text are built together rather than assembled by hand.

Console 없이 DynamoDB 작업하기

DynoTable은 DynamoDB를 위한 빠른 데스크톱 클라이언트입니다 — 테이블을 탐색하고, SQL 스타일 쿼리를 실행하고, 항목을 로컬에서 편집하세요.