对本地dynamodb的查询给出了错误

时间:2016-09-20 05:18:17

标签: javascript

var emailID = "NewEmailID@gmail.com";

 var qparams = {
      TableName : "patient",
      KeyConditionExpression: "#em = :email",
      ExpressionAttributeNames:{
        "#em": "email"
      },
      ExpressionAttributeValues: {
        ":email":emailID
      }
    };

dynamodb.query(qparams,function(err,data){
   if(err)
   console.log(JSON.stringify(err,null,2));
    else
    console.log(JSON.stringify(data,null,2));
});

以上代码在aws控制台中本地运行时会出现错误

"message": "Unexpected key '19' found in params.ExpressionAttributeValues[':email']",
      "code": "UnexpectedParameter",
      "time": "2016-09-20T05:16:37.945Z"
    }
  ],
  "time": "2016-09-20T05:16:37.945Z"

0 个答案:

没有答案