Folks, I have the following table:
hashKey (model): RangeKey (make):
mustang ford
f150 ford
malibu chevy
...
What I would like to do is search and return all Ford models, ie:
var params = {
TableName : 'models',
IndexName : 'make-index',
KeyConditions :
{
"make" :
{
"AttributeValueList" : [
{
"S" : 'ford'
}
],
"ComparisonOperator" : "EQ"
}
},
}
db.query(params, function(err, data) {
if (err) {
console.log (err)
callback(err, null)
} else {
callback(null, data.Items)
}
});
What am I doing wrong? :) Thanks!
entrymakemodelIf i make hashkey a known string, then i can certainly query. but this seems like a non-aws way of using dynamo