Trying to create a Lambda to update DynamoDB from a Kinesis stream. Here is my update statement:
var response = dd.updateItem({
'Key': {'S': payload.identityId},
'TableName': 'Users',
'UpdateExpression': 'SET testVal = :testVal',
'ExpressionAttributeValues': {
':testVal': {'S': 'This is a test'}
}
}
That generates 47 error messages:
InvalidParameterType: Expected params.Key['S'] to be a structure
UnexpectedParameter: Unexpected key '0' found in params.Key['S']
- UnexpectedParameter: Unexpected key '1' found in params.Key['S']
- UnexpectedParameter: Unexpected key '2' found in params.Key['S']
- UnexpectedParameter: Unexpected key '3' found in params.Key['S']
...
- UnexpectedParameter: Unexpected key '44' found in params.Key['S']
- UnexpectedParameter: Unexpected key '45' found in params.Key['S']"}
The Users table exists and is currently empty. I've double checked the identityID exists (and is valid). Can anyone see what I'm doing wrong here?