How can I Use begins_with method on primary key in DynamoDB?

后端 未结 3 1683
囚心锁ツ
囚心锁ツ 2021-01-17 10:02

I have Table with 2 attribute id(string,primary key), value(string). When I try follwoing KeyConditionExpression it throws Query key condition not supported

3条回答
  •  自闭症患者
    2021-01-17 10:37

    You can use begins_with and contains only with a range key after specifying an EQ condition for the primary key.

    To use EQ with the primary key you can do

    KeyConditionExpression: "ID = :tagIDValue"
    

提交回复
热议问题