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

后端 未结 3 1644
囚心锁ツ
囚心锁ツ 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:35

    I would stay away from scans at all costs, in this scenario I would create a global secondary index. The primary key on a GSI doesn't require uniqueness and you can query off of that. Storage is cheap, you can probably live with the extra keys.

提交回复
热议问题