Error: dynamodb no range key value present

Answered by Rafal Wilinski
Last updated: October 23rd, 2026
Solution
“No range key value present” commonly comes from a mapper when a single-item operation needs a sort key but the model or request does not supply it. A range key is DynamoDB’s older name for a sort key. Check the actual table schema and the mapper’s key annotations.
- For GetItem, DeleteItem, and UpdateItem, provide both key attributes on a composite-key table. For PutItem, include both in the item.
- Keep key names and types identical to DescribeTable. A string key cannot be replaced with a numeric value, and key values cannot be empty.
- For Java models, map the sort-key property and set its value before an item operation. Java 2.x uses @DynamoDbSortKey; legacy DynamoDBMapper uses @DynamoDBRangeKey.
- Query is different: it requires partition-key equality but can omit the sort-key condition to read the item collection. Do not add a fabricated sort key merely to run a Query.
// Parameters for SDK v3 GetCommand on a table with string pk and sk.
const params = {
TableName: "Orders",
Key: { pk: "CUSTOMER#123", sk: "ORDER#456" }
};If the real table has only a partition key, remove an erroneous sort-key mapping from the application model. Adding a sort key to an existing base table requires a migration, not an extra request parameter.
See sort-key examples and AWS documentation.
Other Common DynamoDB Errors (with Solutions)
- DynamoDB BatchWriteItem error
- dynamodb attribute does not exist
- DynamoDB No Provisioned Throughput specified for the table
- ExpressionAttributeValues contains invalid value: One or more parameter values were invalid: An AttributeValue may not contain an empty string
- dynamodb could not instantiate class
- AWS DynamoDB CredentialsError: Missing credentials in config
- DynamoDB failedbatch retry
- dynamodb update fail if not exists
- Error ValidationException: One or more parameter values were invalid: Type mismatch for key X expected: S actual: M
- dynamodb cannot create preexisting table
- DynamoDB Scan Not Working
- DynamoDB console unable to delete this item
- DynamoDB is not showing all columns
- aws.dynamodb.documentclient is not a constructor
- failed to begin subsegment named 'amazondynamodbv2': segment cannot be found.
Dynobase is a Professional GUI Client for DynamoDB
Start your 7-day free trial today
Product Features
DynamoDB Tools
- SSH GUI Client
- Chat With Cloud
- MongoDB GUI Client
- AWS Cost Monitoring
- DynamoDB Query Builder
- DynamoDB Code Examples
- DynamoDB Node.js Queries
- DynamoDB JSON Converter
- DynamoDB UUID Generator
- DynamoDB Local Admin GUI
- DynamoDB Pricing Calculator
- DynamoDB Single-Table Design
- Best DynamoDB GUI Clients
- Dynobase vs DynoTable
DynamoDB Info
© 2026 Dynobase