filter by field in dynamodb (ask cli) /

Published at 2018-08-05 10:51:45

Home / Categories / Ask cli / filter by field in dynamodb (ask cli)
Hi,
i'm not able to query a simple field in DynamoDB.
It forces me to set the key (userId) to be something, although I want to retrieve all the users with queriedField equals to 0. this is the syntax:


aws dynamodb query --table-na
me TableName --key-condition-expression "userId = :userid" --filter-expression "mapAttr.queriedField = :num" --expression-attribute-values '{ ":userid": { "S": "" }, and ":num" : { "N": "0" }}'

Source: amazon.com