Suh*_*pta 1 amazon-web-services node.js amazon-dynamodb
我正在尝试查询 Dynamomodified_time > 1 day和jstatus = Error
这里,JobStatusIndex是Global Secondary Index拥有,modified_time作为Partition Key和jstatus作为sort key。
dynamo.query({
TableName: "Jobs",
IndexName: "JobStatusIndex", // Global Secondry Index
KeyConditionExpression: `modified_time >= :ter and jstatus = :ste`,
ExpressionAttributeValues: {
':ter': moment().subtract(1, 'day').unix(),
':ste': "Error"
}
},(err) => console.log(err))
Run Code Online (Sandbox Code Playgroud)
但我收到一条错误消息:
ValidationException: Query key condition not supported
Run Code Online (Sandbox Code Playgroud)
这可能是什么原因?我只是不明白这个。
我经历了一些 SO 问题,但它没有解决问题。我已经准备好了所需的钥匙。我错过了什么?