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)
- DynamoDB BatchSave not working
- DynamoDB Invalid UpdateExpression Syntax Error Token
- Error ValidationException: One or more parameter values were invalid: Type mismatch for key X expected: S actual: M
- DynamoDB ConditionalCheckFailedException
- could not unconvert attribute dynamodb
- dynamodb-admin is not recognized as an internal or external command
- a socket operation was attempted to an unreachable network dynamodb
- appsync dynamodb not seeing all fields
- dynamodb could not connect to the endpoint url
- dynamodb the table does not have the specified index
- dynamodb system errors metric
- dynamodb property projection cannot be empty
- dynamodb validation error detected
- Float types are not supported. Use decimal types instead.
- DynamoDB Internal Server Error
Better DynamoDB experience.
Try 7-day free trial. No credit card needed.
Product Features
DynamoDB Tools
DynamoDB Info
© 2023 Dynobase