I am observing an unexpected outcome when querying a DynamoDB table using the AWS DynamodB Document Model in C#.
My table users
has a username primary key. The GSI was set in for user_type
, user_id
and username
keys.
This table works when I insert a document, but when querying a non-indexed but GSI-ed column, it returns this error:
Either the KeyConditions or KeyConditionExpression parameter must be specified in the request.
I have specified the condition in a filter object. Why am I asked to provide KeyConditions
or KeyConditionExpression
? Is it mandatory to specify them? If yes, how do I do that?