0

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

1
  • As the --key-conditions is a legacy parameter, I think there is no need to get to the bottom for IN condition Commented Jul 2, 2017 at 16:04

2 Answers 2

2

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).

Sign up to request clarification or add additional context in comments.

2 Comments

Hello Chris, Thanks for ur answer:)
Hello Chris, Thanks for ur answer, but I am still confused because I read the Dev Guide and Reference Guide and find the --key-condition-expression can only do once equality test for Partition Key and Sorted Key, not a IN test in en array. So what is the point of IN condition?
0

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.