title: Invalid Type error for PutItem AWS DynamoDB
body: <p>We have a DynamoDB table with a partition key and sort key. Both the keys are Number type. I am trying to insert items using the PutItem API of the boto3 DynamoDB client. I am getting the below error;</p>
  <pre><code>Traceback (most recent call last):
    File &quot;&lt;stdin&gt;&quot;, line 1, in &lt;module&gt;
    File &quot;C:\Users\satis\Anaconda3\envs\py369\lib\site-packages\botocore\client.py&quot;, line 316, in _api_call
      return self._make_api_call(operation_name, kwargs)
    File &quot;C:\Users\satis\Anaconda3\envs\py369\lib\site-packages\botocore\client.py&quot;, line 599, in _make_api_call
      api_params, operation_model, context=request_context)
    File &quot;C:\Users\satis\Anaconda3\envs\py369\lib\site-packages\botocore\client.py&quot;, line 647, in _convert_to_request_dict
      api_params, operation_model)
    File &quot;C:\Users\satis\Anaconda3\envs\py369\lib\site-packages\botocore\validate.py&quot;, line 297, in serialize_to_request
      raise ParamValidationError(report=report.generate_report())
  botocore.exceptions.ParamValidationError: Parameter validation failed:
  Invalid type for parameter Item.doc_id.N, value: 1234, type: &lt;class 'int'&gt;, valid types: &lt;class 'str'&gt;
  Invalid type for parameter Item.passage_id.N, value: 1, type: &lt;class 'int'&gt;, valid types: &lt;class 'str'&gt;
  </code></pre>
  <p>The error does not make sense as the value for the sort key I am inserting is an integer and matches with the Number type of the dynamodb. The error clearly states that the value type is an integer but the required type is a string. Not sure what I am missing here.</p>
  <p>Following is the data I am trying to insert;</p>
  <pre><code>{'doc_id': {'N': 1234}, 'passage_id': {'N': 1}, 'text': {'S': 'some text to insert'}, 'urls': {'S': '[]'}, 'html': {'S': '&lt;p&gt;this is para&lt;/p&gt;'}}
  </code></pre>
  <p>Following is the code I am using to insert above dictionary;</p>
  <pre><code>import boto3
  dynamodb_client=boto3.client('dynamodb',region_name='region_name')
  dynamodb_client.put_item(TableName='table_name',Item=data)
  </code></pre>
  <p>To reiterate, both the key viz. doc_id and passage_id are <strong>Number type</strong> in dynamodb.</p>
  <p>Appreciate the help.</p>