DynamoDB - with Serverless
Why does the following Lambda function fail to update an item in DynamoDB?
```javascript
const AWS = require('aws-sdk');
const docClient = new AWS.DynamoDB.DocumentClient();
exports.handler = async (event) => {
const params = {
TableName: 'Users',
Key: { userId: event.userId },
UpdateExpression: 'set email = :email',
ExpressionAttributeValues: {
':email': event.email
}
};
await docClient.update(params).promise();
return { statusCode: 200 };
};
```
