title: Dynamodb exact reason for response code 400
body: <p>Is there any way to find out the exact reason for the response code 400 from DynamoDB? Facing issues while experimenting with DynamoDB. My primary key is Topic, and PostedTimeStamp is sort key and I have created an LSI on category. Following is the command to create the table. </p>
  
  <pre><code>aws dynamodb create-table --debug --table-name Topics  --attribute-definitions AttributeName=Topic,AttributeType=S AttributeName=PostedTimeStamp,AttributeType=S AttributeName=Category,AttributeType=S AttributeName=SubCategory,AttributeType=S --key-schema AttributeName=Topic,KeyType=HASH AttributeName=PostedTimeStamp,KeyType=RANGE --provisioned-throughput ReadCapacityUnits=5,WriteCapacityUnits=5 --local-secondary-indexes IndexName=TopicCategory,KeySchema=["{AttributeName=Topic, KeyType=HASH}","{AttributeName=Category, KeyType=RANGE}"],Projection="{ProjectionType=KEYS_ONLY}" IndexName=TopicSubCategory,KeySchema=["{AttributeName=Topic,KeyType=HASH }","{AttributeName=SubCategory,KeyType=RANGE}"],Projection="{ProjectionType=KEYS_ONLY"}
  </code></pre>
  
  <p>Following is the query I am trying to run.</p>
  
  <pre><code>  {
      "TableName": "Topics",
      "IndexName": "TopicCategory",
      "ConsistentRead": false,
      "KeyConditionExpression": "Topic = :v1 and Category = :v2",
  
      "ExpressionAttributeValues": {
          ":v1": {
              "S": "DyanmoDB"
          }
          ":v2": {
              "S": "LSI"
          }
      }
  }
  </code></pre>
  
  <p>Receiving following response... which is common for a number of errors... like InvalidAction, InvalidParameterCombination, InvalidQueryParameter, etc. </p>
  
  <pre><code>"Received response. Status: 400, Integration latency: 6 ms
  </code></pre>