title: DynamoDB and Boto3 error on BatchGetItem operation: "The provided key element does not match the schema"
body: <p>I am having difficulty with the Boto3/DynamoDB <strong>BatchGetItem</strong> operation. I would greatly appreciate any help or guidance! I'm pretty new to python/aws so sorry in advanced if this is a novice question. </p>
  
  <p>When I perform the operation, I get this error: </p>
  
  <pre><code>botocore.exceptions.ClientError: An error occurred (ValidationException) when calling the BatchGetItem operation: The provided key element does not match the schema
  </code></pre>
  
  <p>Here is my code:</p>
  
  <pre><code>import boto3
  dynamodb = boto3.resource('dynamodb', region_name='us-west-2')
  response = dynamodb.batch_get_item(
      RequestItems={
          'test': {
              'Keys': [
                  {
                      'item_ID': {
                          'S': '1'
                      }
                  },
                  {
                      'item_ID': {
                          'S': '2'
                      }
                  }
              ],
              'ProjectionExpression': 'item_ID, color',
          }
      }
  )
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/fF8vE.png" rel="nofollow noreferrer">This is a screen-cap of the items in the table.</a></p>
  
  <p><a href="https://i.stack.imgur.com/bGKLD.png" rel="nofollow noreferrer">This is a screen-cap of the table details, showing the partition key is 'item_ID' and that it's a 'string'</a></p>
  
  <p>Here is the fulll error message:</p>
  
  <pre><code>Traceback (most recent call last):
  File "C:/Users/Henry Miller/PycharmProjects/bioinformatics_webapp/get_items.py", line 18, in &lt;module&gt;
  'ProjectionExpression': 'item_ID, color',
  File "C:\Users\Henry Miller\PycharmProjects\bioinformatics_webapp\venv\lib\site-packages\boto3\resources\factory.py", line 520, in do_action
  response = action(self, *args, **kwargs)
  File "C:\Users\Henry Miller\PycharmProjects\bioinformatics_webapp\venv\lib\site-packages\boto3\resources\action.py", line 83, in __call__
  response = getattr(parent.meta.client, operation_name)(**params)
  File "C:\Users\Henry Miller\PycharmProjects\bioinformatics_webapp\venv\lib\site-packages\botocore\client.py", line 314, in _api_call
  return self._make_api_call(operation_name, kwargs)
  File "C:\Users\Henry Miller\PycharmProjects\bioinformatics_webapp\venv\lib\site-packages\botocore\client.py", line 612, in _make_api_call
  raise error_class(parsed_response, operation_name)
  botocore.exceptions.ClientError: An error occurred (ValidationException) when calling the BatchGetItem operation: The provided key element does not match the schema
  </code></pre>