0
votes

Here is my question: I read from amazon dynamodb api that the condition IN for query means Checks for matching elements in a list*, but why it returns an error : **Query key condition not supported?

aws dynamodb query --table-name Music --key-conditions '{"Artist": {"AttributeValueList": [{ "S": "Wangdong"}, {"S":"Acme Band"} ], "ComparisonOperator": "IN" }}' --endpoint-url http://localhost:8000

An error occurred (ValidationException) when calling the Query operation: Query key condition not supported

2
As the --key-conditions is a legacy parameter, I think there is no need to get to the bottom for IN conditionOwen Wang

2 Answers

2
votes

That is because it is a legacy parameter:

--key-conditions (map)

This is a legacy parameter. Use KeyConditionExpression instead. For more information, see key-conditions in the Amazon DynamoDB Developer Guide

Look instead into using --key-condition-expression as per the documentation (sorry there's no HTML element ID so I can't direct link to it).

0
votes

As the --key-conditions is a legacy parameter, I think there is no need to get to the bottom for IN condition.