title: Lambda function making an athena query and the query result is not in the S3 output bucket
body: <p>I'm querying an S3 bucket with athena through python boto3. The query is successful and there are no errors but the output S3 bucket is empty. But when I run the query through the python console it works and there is .csv and .csv.metadata with the athena query results in the S3 output bucket. </p>
  
  <p>I have added permissions mentioned on this page. <a href="https://docs.aws.amazon.com/athena/latest/ug/cross-account-permissions.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/athena/latest/ug/cross-account-permissions.html</a></p>
  
  <p>Not sure if this matters but the S3 output bucket where the query results should be is not managed by serverless (that's what I'm using for my project) it is an existing S3 bucket and I used this package and instructions <a href="https://www.npmjs.com/package/serverless-plugin-existing-s3" rel="nofollow noreferrer">https://www.npmjs.com/package/serverless-plugin-existing-s3</a> and it works fine with dynamoDB and glue Catalog information getting dumped when a lambda is trigered. </p>
  
  <pre><code>def function(event,context):
  client = boto3('athena')
  query = 'select * from athenaTable'
  response = client.start_query_execution(
          QueryString=params["query"],
          QueryExecutionContext={
              'Database': params['database']
          },
          ResultConfiguration={
              'OutputLocation': 's3://bucket-name/key/' #output bucket
          }
      )
      return response
  </code></pre>