title: "Athena.InvalidRequestException" in Step function
body: <p>I'm trying to read the query string from input but step function gives - &quot;Athena.InvalidRequestException&quot;</p>
  <pre><code>{
    &quot;StartAt&quot;: &quot;CallFunction&quot;,
    &quot;States&quot;: {
      &quot;CallFunction&quot;: {
        &quot;Type&quot;: &quot;Task&quot;,
        &quot;Resource&quot;: &quot;arn:aws:lambda:us-west-2:12345:function:readFile&quot;,
        &quot;ResultPath&quot;: &quot;$.query&quot;,
        &quot;Next&quot;: &quot;Start an Athena query&quot;
      },
      &quot;Start an Athena query&quot;: {
        &quot;Resource&quot;: &quot;arn:aws:states:::athena:startQueryExecution.sync&quot;,
        &quot;Parameters&quot;: {
          &quot;QueryString&quot;: &quot;$.query&quot;,
          &quot;WorkGroup&quot;: &quot;primary&quot;,
          &quot;ResultConfiguration&quot;: {
            &quot;OutputLocation&quot;: &quot;s3://test_athena/test1&quot;
          }
        }
    }
  }
  </code></pre>
  <p>Intput of Start an Athena query state:</p>
  <pre><code>{
    &quot;Comment&quot;: &quot;Insert your JSON here&quot;,
    &quot;query&quot;: &quot;\&quot;SELECT *   FROM test1   LIMIT 10;  \&quot;&quot;
  }
  
  </code></pre>
  <p>Getting the below error on Start an Athena query state :</p>
  <pre><code>{
    &quot;resourceType&quot;: &quot;athena&quot;,
    &quot;resource&quot;: &quot;startQueryExecution.sync&quot;,
    &quot;error&quot;: &quot;Athena.InvalidRequestException&quot;,
    &quot;cause&quot;: &quot;line 1:1: mismatched input '$'. Expecting: 'ALTER', 'ANALYZE', 'CALL', 'COMMIT', 'CREATE', 'DEALLOCATE', 'DELETE', 'DESC', 'DESCRIBE', 'DROP', 'EXECUTE', 'EXPLAIN', 'GRANT', 'INSERT', 'PREPARE', 'RESET', 'REVOKE', 'ROLLBACK', 'SET', 'SHOW', 'START', 'UNLOAD', 'UPDATE', 'USE', &lt;query&gt; (Service: AmazonAthena; Status Code: 400; Error Code: InvalidRequestException; Request ID: 2a99f6eb-b853-407f-b229-d309a4ca3f5c; Proxy: null)&quot;
  }
  </code></pre>
  <p>I'm new to AWS. Can someone help me out in this how to pass query object in QueryString parameter of Athena ?</p>