Error: ExpressionAttributeValues contains invalid value: One or more parameter values were invalid: An AttributeValue may not contain an empty string
Solution
This error means that you’ve used query which some empty value and DynamoDB does not accept that. There are two possible ways of fixing:
- Find and fix empty value, replace with something meaningful or remove from query at all
- In DocumentClient constructor add convertEmptyValues param set to true:
const DynamoDB = new AWS.DynamoDB.DocumentClient({ convertEmptyValues: true });
This will make DynamoDB SDK to automatically convert all empty values to null.
Other Common DynamoDB Errors (with Solutions)
- ConfigError: Missing region in config
- com amazonaws services dynamodbv2 model resourcenotfoundexception
- ImportError: No module named boto3 (DynamoDB)
- DynamoDB FilterExpression Not Working
- DynamoDB Internal Server Error
- cannot find module 'dynamodb-doc'
- 'dynamodb' object has no attribute 'table'
- CORS Error DynamoDB
- dynamodb items page not authorized with read access
- DynamoDB Delete Method Not Working For The First Time
- DynamoDB Code Working In Node But Not SAM
- amazon dynamodb query parentparams is not defined
- DynamoDB - The Security Token Included In The Request Is Invalid
- AWS CLI DynamoDB Error Parsing Parameter
- could not unconvert attribute dynamodb
Tired of switching accounts and regions? Use Dynobase.
Try 7-day free trial. No credit card needed.
Product Features
DynamoDB Tools
DynamoDB Info
© 2023 Dynobase