Error: ExpressionAttributeValues contains invalid value: One or more parameter values were invalid: An AttributeValue may not contain an empty string
![Rafal Wilinski](https://pbs.twimg.com/profile_images/1390706809548197895/SVCKpLNE_400x400.png)
Answered by Rafal Wilinski
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)
- dynamodb localhost not working
- dynamodb cannot create preexisting table
- comparison operator does not return all attributes dynamodb
- dynamodb could not instantiate class
- dynamodb cannot read property '0' of undefined
- DynamoDB Is Unsupported It Cannot Be Instantiated
- failed to begin subsegment named 'amazondynamodbv2': segment cannot be found.
- lambda function not triggering from dynamodb
- CORS Error DynamoDB
- DynamoDB Query Limit Not Working
- amazon dynamodb query parentparams is not defined
- dynamodb system error cloudwatch
- dynamodb not a managed type
- dynamodb no range key value present
- DynamoDB string set may not be empty
Login to the AWS Console less. Use Dynobase.
Try 7-day free trial. No credit card needed.
Product Features
DynamoDB Tools
DynamoDB Info
© 2024 Dynobase