I've written the following code which is using DynamoDB:
var qryItem = {
TableName: 'MyTable',
Key: {
UserId: {
S: '1234567'
}
}
};
dynamoDb.getItem(qryItem, function (error, data) {
console.log(data);
if(error){
console.log(error, error.stack);
}
});
The table MyTable has the following attributes:
- UserId (String) Primary partition key
- Name (String) Primary sort key
- email (string)
I've successfully executed a scan operation, but when I execute the getItem request above, the following error is returned:
ValidationException: The provided key element does not match the schema
Any advice would be greatly appreciated.