title: AWS Dynamodb boto3 batch_write_item isn't working
body: <p>I've been trying to wrap my mind around how batch_write_item works in the boto3 (Python SDK for AWS). My code is as follows:</p>
  
  <pre><code>users = self.scan_table(filterKey="key",filterValue="value",table="users")
  deleteUsers = []
  
  # Create lists to delete
  for u in users:
      deleteUsers.append({"DeleteRequest":{"Key":{"S":u["user_id"]}}})
  
  # Delete items
  ret = self.db.batch_write_item(
      RequestItems={
          "users":delUsers
      }
  )
  </code></pre>
  
  <p>The output is as follows (for each item to be deleted):</p>
  
  <pre><code>ClientError: An error occurred (ValidationException) when calling the
  BatchWriteItem operation: The provided key element does not match the schema
  </code></pre>
  
  <p>As far as I can tell, I am following the prescribed instructions in the <a href="http://boto3.readthedocs.io/en/latest/reference/services/dynamodb.html#DynamoDB.ServiceResource.batch_write_item" rel="nofollow noreferrer">documentation</a> exactly. What am I missing?</p>
  
  <p>EDIT:
  As per jarmod's comment, I felt I needed to specify that I am indeed using the boto3 resource, not the client. There are two separate sets of documentation for the <a href="http://boto3.readthedocs.io/en/latest/reference/services/dynamodb.html#client" rel="nofollow noreferrer">client</a> vs. the <a href="http://boto3.readthedocs.io/en/latest/reference/services/dynamodb.html#DynamoDB.ServiceResource.batch_get_item" rel="nofollow noreferrer">resource</a>. Turns out that using the correct documentation for the function you are using is advisable.</p>