title: python boto3 dynamodb query function dynamic arguments
body: <p>Python boto3 library dynamodb.query method.
  how do we pass dynamic arguments</p>
  
  <pre><code>client = boto3.resource("dynamodb")
  
  params = {
      "Limit": 10,
      "ExpressionAttributeNames":{"#pk":"pk"},
      "ExpressionAttributeValues":{":pk":"value"},
      "KeyConditionExpression":"#pk=:pk",
      "ScanIndexForward": False
  }
  res = client.query(params)
  </code></pre>
  
  <p>It responds with error:</p>
  
  <pre><code>An error occurred (ValidationException) when calling the Query operation: Either the KeyConditions or KeyConditionExpression parameter must be specified in the request.
  </code></pre>