title: 400 Bad Request response: KeyConditionExpression parameter must be specified in the request
body: <p>I am trying to use amazon dynamodb in my php application. I have setup the credential correctly. Now, I am trying to get the data from the Amazon DynamoDB to my application. But it is giving me an exception at the query line.</p>
  
  <p>The full exception error is </p>
  
  <blockquote>
    <p>Unable to query: Error executing "Query" on "<a href="https://dynamodb.my-region.amazonaws.com" rel="nofollow noreferrer">https://dynamodb.my-region.amazonaws.com</a>"; AWS HTTP error: Client error: <code>POST https://dynamodb.my-region.amazonaws.com</code> resulted in a <code>400 Bad Request</code> response: {"__type":"com.amazon.coral.validate#ValidationException","message":"Either the KeyConditions or KeyConditionExpression (truncated...) ValidationException (client): Either the KeyConditions or KeyConditionExpression parameter must be specified in the request. - {"__type":"com.amazon.coral.validate#ValidationException","message":"Either the KeyConditions or KeyConditionExpression parameter must be specified in the request."}</p>
  </blockquote>
  
  <p>Here is my code,</p>
  
  <pre><code>$sdk = new Aws\Sdk([
          'region' =&gt; 'my region',
          'version' =&gt; 'latest',
          'credentials' =&gt; [
              'key' =&gt; 'my key',
              'secret' =&gt; 'my secret key'
          ],
          'DynamoDb' =&gt; [
              'region' =&gt; 'my region',
          ],
      ]);
  
      $dynamodb = $sdk-&gt;createDynamoDb();
      $marshaler = new Marshaler();
  
      $tableName = 'My Table Name';
  
      $params = [
          'TableName' =&gt; $tableName
      ];
  
      try {
          $result = $dynamodb-&gt;query($params);
      } catch (DynamoDbException $e) {
          echo "Unable to query:\n";
          echo $e-&gt;getMessage() . "\n";
      }
  </code></pre>
  
  <p>The error is coming from the try-catch block. Can anybody give me the reason and solution of this error? 
  Any suggestion for this error? Thanks in advance.</p>