I have a simple table with userId, pictureURL and a few other fields. I want to return all the fields with a certain userId but when I do
dynamodb.get({
TableName: tableName,
Key: {
'userid': '39e1f6cb-22af-4f8c-adf5-xxxxxxxxxx'
}
}, ...
I get The provided key element does not match the schema since it seems like it requires also the sort key. When I do
dynamodb.get({
TableName: tableName,
Key: {
'userid': '39e1f6cb-22af-4f8c-adf5-xxxxxxxxxx',
'pictureurl': '' // Or null
}
}, ...
I get an error One or more parameter values were invalid: An AttributeValue may not contain an empty string
So how do I query for any value in the sort key?