DynamoDB: Like (Guide w/ Code Examples)

Provided by Rafal Wilinski
To perform a like query using the AWS SDK for JavaScript, you need to use the contains function with the FilterExpression parameter, and pass it to a query operation.
const AWS = require('aws-sdk'); const dynamodb = new AWS.DynamoDB({region: 'us-west-2', apiVersion: '2012-08-10'}); const params = { TableName : 'YourTableName', IndexName: 'YourIndexName', KeyConditionExpression: '#name = :value', FilterExpression: 'contains(#name, :value)', ExpressionAttributeNames:{ '#name': 'name' }, ExpressionAttributeValues: { ':value': {S: 'string'} } }; dynamodb.query(params, function(err, data) { if (err) { console.log("Error", err); } else { console.log("Success", data); } });
Similar Code Examples
- DynamoDB BatchWriteItem in Typescript
- DynamoDB: BatchGetItem
- DynamoDB: Query Ends With
- DynamoDB: Query Date Range
- DynamoDB: Query Items
- DynamoDB: Create if Not Exists
- DynamoDB: Increment Counter
- DynamoDB Get in Typescript
- DynamoDB: Delete Multiple Items in Javascript
- DynamoDB: Query Global Secondary Index in Nodejs
- DynamoDB: Get Random Item
- DynamoDB: Query Greater Than
- DynamoDB: Query Group By
- DynamoDB: Not Begins With
- DynamoDB: GetItem
Dynobase is a Professional GUI Client for DynamoDB
Start your 7-day free trial today
Product Features
DynamoDB Tools
DynamoDB Info
© 2026 Dynobase