title: Using query IndexName, GSI in DynamoDB and not available begins_with in python
body: <p>I am following the documentation and I see that &quot;begins_with&quot; is available to use in python 3.7, but I am getting the next error if I want to query a table with GSI &quot;createdAt-index&quot;.</p>
  <p>So here is the code that doesn't works:</p>
  <pre><code>
  def query_pharmaorders(date):
      table = dynamodb.Table('users')
      response = table.query(
          IndexName=&quot;createdAt-index&quot;,
          KeyConditionExpression=Key('createdAt').begins_with(&quot;2020&quot;),
      )
      return (response['Items'])
  </code></pre>
  <p>Here is the error:</p>
  <pre><code>
  Response
  {
    &quot;errorMessage&quot;: &quot;Syntax error in module 'lambda_function': invalid syntax (lambda_function.py, line 19)&quot;,
    &quot;errorType&quot;: &quot;Runtime.UserCodeSyntaxError&quot;,
    &quot;stackTrace&quot;: [
      &quot;  File \&quot;/var/task/lambda_function.py\&quot; Line 19\n    \t\tKeyConditionExpression=Key('createdAt').begins_with(\&quot;2020\&quot;)\n&quot;
    ]
  }
  
  </code></pre>
  <p>Where my partition Key is createdAt.</p>
  <p>Any ideas?</p>