LoginSignup
3
2

More than 3 years have passed since last update.

【DynamoDB】KeyConditionExpressions must only contain one condition per keyの対応

Last updated at Posted at 2019-08-26

DynamoDBで下記のような抽出条件を実施する。
KeyConditionExpression: 'id = :id and startAt >= :startAtAfter and startAt <= :startAtTo',

そうすると、次のようなエラーが発生
KeyConditionExpressions must only contain one condition per key

重複した項目を抽出要件に含められないとのこと。次のようなクエリにして対応した。
KeyConditionExpression: 'id = :id and startAt BETWEEN :startAtAfter AND :startAtTo'

3
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
2