'Invalid KeyConditionExpression: An expression attribute value used in expression is not defined

aws dynamodb query --table-name shoutout-testing --key-condition-expression "Model = :a"

I tried this query but it's saying that :a is not defined



Solution 1:[1]

You need to also pass the --expression-attribute-values parameter to define this ":a". For example, --expression-attribute-values '{ ":a": {"S": "hello"} }'. Please check the CLI "query" documentation here.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Nadav Har'El