title: ValidationException: The provided key element does not match the schema
body: <p>I created a table 'user_info' in DynamoDB with one primary hash key 'user_id'(String), no range key. Then I created 2 AWS lambda functions to insert and query the items. I can insert items into the table, but when I query the table, it returns:</p>
  
  <blockquote>
    <p>ValidationException: The provided key element does not match the
    schema.</p>
  </blockquote>
  
  <p><strong>My query function :</strong></p>
  
  <pre><code>var params = {
     Key: {
         user_id:{
             S: "usr1@s.com"
         }
     },
      TableName: 'user_info',
      ProjectionExpression: 'password'
  };
  
  dynamodb.getItem(params,
   function(err, data) {
      if (err) {
          console.log("get item err." + err);
          context.done('error','getting item from dynamodb failed: '+err);
      }
      else {
          console.log('great success: '+JSON.stringify(data, null, '  '));
          context.succeed('created user ' + event.user_id + ' successfully.');
      }
  });
  </code></pre>
  
  <p>I keep getting this exception:</p>
  
  <pre><code>ValidationException: The provided key element does not match the schema
  </code></pre>
  
  <p>Since </p>
  
  <p>1) I have only one hash primary key.</p>
  
  <p>2)user_id is defined as String. I really don't know why there is a mismatch error.</p>