DynamoDB: Not Begins With (Guide w/ Code Examples)

Provided by Rafal Wilinski
The DynamoDB JavaScript SDK does not have a method specifically called "not begins with." However, you can use the scan or query operations with a FilterExpression that uses the not_begins_with method to retrieve items that do not have an attribute that begins with a certain value.
const AWS = require('aws-sdk'); const dynamoDB = new AWS.DynamoDB({region: 'us-west-2', apiVersion: '2012-08-10'}); const params = { TableName: 'my-table', FilterExpression: 'not_begins_with(attribute, :val)', ExpressionAttributeValues: { ':val': {S: 'example'} } }; dynamoDB.scan(params, (err, data) => { if (err) { console.log(err); } else { console.log(data); } });
Similar Code Examples
- DynamoDB: Query Ends With
- DynamoDB: Batch Get
- DynamoDB: Bulk Insert
- DynamoDB: Query Date Range
- DynamoDB: GetItem
- DynamoDB Get in Typescript
- DynamoDB: Get By ID
- DynamoDB: Query KeyConditionExpression
- DynamoDB: Delete Multiple Items in Javascript
- DynamoDB: Create if Not Exists
- DynamoDB: Get Last Inserted Item
- DynamoDB: Get All Items
- DynamoDB: Get Random Item
- DynamoDB: Query Items
- DynamoDB: Query Greater Than
Tired of AWS Console? Try Dynobase.
Start your 7-day free trial today
Product Features
DynamoDB Tools
DynamoDB Info
© 2026 Dynobase