【发布时间】:2015-08-12 05:40:08
【问题描述】:
在 dynamodb 表上运行 batchGetItem 函数时出现 ValidationException。我在键列表下同时给出哈希键和范围键。这是请求和响应。
请求:
var params = {"RequestItems":{"table":{"Keys":[{"hash_key":{"S":"xx.xxx.xxx.xxx"}},{"range_key":{"S":"xxxxx"}}]}}};
dynamodb.batchGetItem(params,function(err, res) {if(err) {console.log(err)}else{console.log(res);}});
回复:
{ [ValidationException: The provided key element does not match the schema]
message: 'The provided key element does not match the schema',
code: 'ValidationException',
time: Tue Jun 30 2015 17:34:07 GMT-0400 (EDT),
statusCode: 400,
retryable: false,
retryDelay: 0 }
【问题讨论】: