title: AWS DynamoDB returns validation error when called from AWS Lambda
body: <p>I'm using AWS Lambda and try to write something to AWS DynamoDB. I use the following code:</p>
  
  <pre><code>var tableName = "locations";
  var item = {
      deviceId: {
          S: event.deviceId
      },
      timestamps: {
          S: event.timestamp 
      }
  }
  var params = {
      TableName: tableName,
      Item: item
  };
  
  dynamo.putItem(params, function(err, data) {
      if (err) {
          context.fail(new Error('Error ' + err));
      } else {
          context.success(null);
      }
  });
  </code></pre>
  
  <p>And I get the following error:</p>
  
  <pre><code>returns Error ValidationException: One or more parameter values were invalid: Type mismatch for key deviceId expected: S actual: M
  </code></pre>