I have Table with 2 attribute id(string,primary key), value(string). When I try follwoing KeyConditionExpression it throws Query key condition not supported.
KeyConditionExpression: "begins_with(ID, :tagIDValue)"
or
KeyConditionExpression: "contains(ID, :tagIDValue)"
From this link I came to know we can use only EQ operations on main key. How can I achieve this
Solution:======================================================
I need to use begins_with or contains to filter So I went with following approach.
Table attributes: PK(partion_key, string), ID(sort key, string), value(string).
Now my primary key is framed based on PK,ID
PK will have constant value for all rows. so KeyConditionExpression will be like.
KeyConditionExpression: "PL = :pk and begins_with(ID, :tagIDValue)"
NOTE: But still contains not working with KeyConditionExpression. I think it was removed from KeyConditionExpression