伙计们,Javascript 新手...尝试从节点进行简单的发电机查询:
var AWS = require('aws-sdk');
AWS.config.update({region: 'us-east-1'});
var db = new AWS.DynamoDB();
var params = {
"TableName" : 'admins',
"Key" : [
{ "username" : { "S" : "foo" } },
],
}
db.getItem(params, function(err, data) {
console.log('error: '+ err);
console.log(data);
return next();
res.send(data);
});
}
输出:
error: UnexpectedParameter: Unexpected key 'username' found in params.Key['0']
谢谢!任何帮助将不胜感激!