title: Error:The provided key element does not match the schema
body: <p>I need to get multile items from dynamodb using lambda with node.js. I am using batchGet method of AWS.DynamoDB.DocumentClient(). I get below error.</p>
  
  <pre><code>{
      "errorMessage": "The provided key element does not match the schema",
      "errorType": "ValidationException",
      "stackTrace": [
          "Request.extractError (/var/runtime/node_modules/aws-sdk/lib/protocol/json.js:48:27)",
          "Request.callListeners (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:105:20)",
          "Request.emit (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:77:10)",
          "Request.emit (/var/runtime/node_modules/aws-sdk/lib/request.js:683:14)",
          "Request.transition (/var/runtime/node_modules/aws-sdk/lib/request.js:22:10)",
          "AcceptorStateMachine.runTo (/var/runtime/node_modules/aws-sdk/lib/state_machine.js:14:12)",
          "/var/runtime/node_modules/aws-sdk/lib/state_machine.js:26:10",
          "Request.&lt;anonymous&gt; (/var/runtime/node_modules/aws-sdk/lib/request.js:38:9)",
          "Request.&lt;anonymous&gt; (/var/runtime/node_modules/aws-sdk/lib/request.js:685:12)",
          "Request.callListeners (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:115:18)"
      ]
  }
  </code></pre>
  
  <p>Below is my code .</p>
  
  <pre><code>const AWS = require('aws-sdk');
  const docClient = new AWS.DynamoDB.DocumentClient();
  const params = {
    RequestItems: {
      "usersTable_Test": {
        Keys: [{
          userId: '123'}
        ],
        ProjectionExpression: "userId"
      }
    }
  };
  const res = await docClient.batchGet(params).promise();
  </code></pre>
  
  <p>I have also tried batchGetItem method but then I get below error.</p>
  
  <pre><code>{
      "errorMessage": "docClient.batchGetItem is not a function",
      "errorType": "TypeError",
      "stackTrace": [
          "exports.handler (/var/task/index.js:62:30)",
          "&lt;anonymous&gt;",
          "process._tickDomainCallback (internal/process/next_tick.js:228:7)"
      ]
  }
  
  </code></pre>