Amazon Athena pricing
Why Athena?
Amazon Athena is a serverless, interactive analytics service built on open-source frameworks that enables you to analyse petabytes of data where it lives. With Athena, there is no infrastructure to set up or manage. Pricing is simple: you pay based on data processed.
To get started, you create a work group that will allow you to specify your query engine, your working directory in Amazon Simple Storage Service (S3) to hold the results of your execution, AWS Identity and Access Management (IAM) roles (if needed) and your resource tags. You can use work groups to separate users, teams, applications or workloads; set limits on the amount of data that each query or the entire work group can process; and track costs.
AWS pricing calculator
Calculate your Amazon Athena and architecture cost in a single estimate.
SQL queries
Additional costs
Athena queries data directly from Amazon S3. There are no additional storage charges for querying your data with Athena. You are charged standard S3 rates for storage, requests and data transfer. By default, query results are stored in an S3 bucket of your choice and are also billed at standard S3 rates.
- You are billed by S3 when your workloads read, store and transfer data. This includes successful and unsuccessful queries. By default, SQL query results are stored in an S3 bucket of your choice and billed at standard S3 rates. See Amazon S3 pricing for more information.
- If you use the AWS Glue Data Catalogue with Athena, you are charged standard Data Catalogue rates. For details, visit the AWS Glue pricing page.
Pricing examples
Example 1 – SQL query
Consider a table with 4 equally sized columns, stored as an uncompressed text file with a total size of 3 TB on Amazon S3. Running a query to get data from a single column of the table requires Amazon Athena to scan the entire file because text formats can’t be split.
- This query would cost: €14.80286325. (Price for 3 TB scanned is 3 * €4.93428775/TB = €14.80286325.)
If you compress your file using GZIP, you might see 3:1 compression gains. In this case, you would have a compressed file with a size of 1 TB. The same query on this file would cost €4.93428775. Athena has to scan the entire file again, but because it’s three times smaller in size, you pay one third of what you did before. If you compress your file and also convert it to a columnar format like Apache Parquet, achieving 3:1 compression, you would still end up with 1 TB of data on S3. But, in this case, because Parquet is columnar, Athena can only read the column that is relevant for the query being run. Because the query in question only references a single column, Athena reads only that column and can avoid reading three quarters of the file. Since Athena only reads a quarter of the file, it scans just 0.25 TB of data from S3.
- This query would cost: €1.2335719375. There is a 3x savings from compression and 4x savings for reading only one column. (File size = 3 TB/3 = 1 TB. Data scanned when reading a single column = 1 TB/4 = 0.25 TB. Price for 0.25 TB = 0.25 * €4.93428775/TB = €1.2335719375)
Additional pricing resources
Easily calculate your monthly costs with AWS
Contact AWS specialists to get a personalised quote