title: Dynamodb query error - Query key condition not supported
body: <p>I am trying to query my dynamodb table to get feed_guid and status_id = 1. But it returns Query key condition not supported error.
  Please find my table schema and query.</p>
  
  <pre><code>$result =$dynamodbClient-&gt;createTable(array(
              'TableName' =&gt; 'feed',
              'AttributeDefinitions' =&gt; array(
                  array('AttributeName' =&gt; 'user_id', 'AttributeType' =&gt; 'S'),
                  array('AttributeName' =&gt; 'feed_guid',    'AttributeType' =&gt; 'S'),
                  array('AttributeName' =&gt; 'status_id',  'AttributeType' =&gt; 'N'),
              ),
              'KeySchema' =&gt; array(
                  array('AttributeName' =&gt; 'feed_guid', 'KeyType' =&gt; 'HASH'),
              ),
  
              'GlobalSecondaryIndexes' =&gt; array(
                  array(
                      'IndexName' =&gt; 'StatusIndex',
                      'ProvisionedThroughput' =&gt; array (
                          'ReadCapacityUnits' =&gt; 5,
                          'WriteCapacityUnits' =&gt; 5
                      ),
                      'KeySchema' =&gt; array(
                          array(
                              'AttributeName' =&gt; 'status_id',
                              'KeyType' =&gt; 'HASH'
                          ),
                      ),
                      'Projection' =&gt; array(
                          'ProjectionType' =&gt; 'ALL'
                      )
                  ),
  
                  array(
                      'IndexName' =&gt; 'UserIdIndex',
                      'ProvisionedThroughput' =&gt; array (
                          'ReadCapacityUnits' =&gt; 5,
                          'WriteCapacityUnits' =&gt; 5
                      ),
                      'KeySchema' =&gt; array(
                          array(
                              'AttributeName' =&gt; 'user_id',
                              'KeyType' =&gt; 'HASH'
                          ),
                      ),
                      'Projection' =&gt; array(
                          'ProjectionType' =&gt; 'ALL'
                      )
                  )
  
              ),
              'ProvisionedThroughput' =&gt; array(
                  'ReadCapacityUnits'  =&gt; 10,
                  'WriteCapacityUnits' =&gt; 20
              )
          ));
  </code></pre>
  
  <p>Following is my query to update that table.</p>
  
  <pre><code> $result = $dynamodbClient-&gt;query(array(
              'TableName' =&gt; 'feed',
              'KeyConditionExpression' =&gt; 'feed_guid = :v_fid AND status_id = :v_sid ',
              'ExpressionAttributeValues' =&gt;  array(
                  ':v_fid' =&gt; array('S' =&gt; '71a27f0547cd5456d9ee7c181b6cb2f8'),
                  ':v_sid' =&gt; array('N' =&gt; 1)
              ),
              'ConsistentRead' =&gt; false
          ));
  </code></pre>