AWS DynamoDB Scan And FilterExpression Using Array Of Hash Values
Answer : You should make use of the IN operator. It is also easier to use Placeholders for attribute names and attribute values. I would, however, advise against using a Scan in this case . It sounds like you already have the hash key attribute values that you want to find, so it would make more sense to use BatchGetItem . Anyways, here is how you would do it in Java: ScanSpec scanSpec = new ScanSpec() .withFilterExpression("#idname in (:val1, :val2, :val3)") .withNameMap(ImmutableMap.of("#idname", "ID")) .withValueMap(ImmutableMap.of(":val1", "123", ":val2", "456", ":val23", "789")); ItemCollection<ScanOutcome> = table.scan(scanSpec); I would imagine using the Javascript SDK it would be something like this: var scanParams = { "TableName":"myAwsTable", "AttributesToGet": ['ID','COMMENTS','DATE'], "Filte...