I am running queries using the Amazon Athena console. Where can I find the results of my query?

When you run a query using Amazon Athena, the results of your query can be accessed in the following ways:

To download the results of a query through the Athena console

If you want to download the results of an Athena query that you just ran from the Athena console, choose the folder icon in the upper-right corner of the Results pane. Your browser will begin downloading the query results in .csv format.

You can also download the results of a query that you ran recently from the Athena console:

  1. From the Athena console, open the History pane.
  2. Find your query, and under Action, choose Download results.

To download the results from an Amazon S3 bucket

When you run an Athena query for the first time, an S3 bucket called "aws-athena-query-results-<account_id>" is created on your account, where "<account_id>" is replaced with your AWS account ID. The results of all Athena queries are stored in this bucket in the format "Unsaved/<year>/<month>/<day>/<query_id>", using the year, month, and day the query was run, as well as the hexadecimal Athena query ID.

You can access the results of any query from this S3 bucket without having to sign in to the Athena console and download it manually.

If you'd like to change the bucket where results are stored, update the bucket location by choosing Settings in the Athena console.

S3, Amazon Athena, query, download

Did this page help you? Yes | No

Back to the AWS Support Knowledge Center

Need help? Visit the AWS Support Center

Published: 2016-12-15