Open MadisonBlake opened 7 years ago
I think the problem is in your ExpressionAttributeValues
map, which should look more like:
"ExpressionAttributeValues":{":id",{"S":"MyValue"}}"
In accordance to @markbiddlecom suggestion the following command works with non-modified package:
AWSDynamoDB.Query({"TableName":"MyTable", "KeyConditionExpression":"ID=:id","ExpressionAttributeValues":{":id":{"S":"MyValue"}}})
.then((response) => {
console.log(response);
}
});
Is the need for {"S":"MyValue"}
documented anywhere? I was largely basing Query's options parameter based on params varable for the same function in Node.js.
@MadisonBlake It's quite unintuitive , but yes it's documented over here. This has stung me many times.
I am calling AWSDynamoDB.Query with the following options:
In AWSRNDynamoDBClient.Query the following exception is thrown when creating QueryResult:
It really seems like my parameters are correct, so I modified AWSRNDynamoDBClient::Query to manually build the request for those given parameters
With that code, the request is correctly built and properly queries the DynamoDB. Obviously that code isn't production quality, but I believe it shows that the incoming options are correctly formatted?