Amazon Athena cost vs self-hosted Trino: where each model wins
The answer depends on how many bytes your queries scan and how often they run, and Trino is the engine family Athena is built on, so the real difference is who pays for compute, operations and people. Athena bills per terabyte scanned or by provisioned capacity, so your cost follows the scan volume your workloads generate. A self-hosted Trino cluster bills you for servers or Kubernetes nodes, storage, monitoring and the on-call time to keep them running. Trino is licensed under Apache-2.0, and its deployment documentation requires a 64-bit Linux system and a 64-bit Java 25 runtime, minimum 25.0.1.
Low, irregular query volumes usually favor the pay-per-query model, because you pay nothing while no one is querying and you carry no cluster to patch. Steady, heavy workloads change the balance. When many dashboards rescan the same S3 data every hour, the per-TB charge repeats on every refresh, and owned compute that stays idle between peaks can become the cheaper option. Confirm your current Athena scan volume per workgroup and per day from billing and query history before comparing. Then model the same workload on the nodes you would actually run, including a second cluster or a standby coordinator if your availability target requires one.
Neither model can be judged from list rates alone, so the answer is not known until you model your own scan volume. Ask your team to export the last few months of Athena query history, group queries by dashboard or job, and estimate how much of each scan repeats. Then ask any vendor or partner quoting a self-hosted Trino build to price the nodes, the catalog, monitoring and the on-call hours separately, so the comparison covers every cost component.
Which cost components each side carries
This table lists each cost component on the Athena side and the self-hosted Trino side, with who is paid and whether the cost is one-time or recurring. Read it as a checklist: take Athena rates from the AWS pricing page for your region, then size each self-hosted line against your own query volume and team. Trino carries no license fee under Apache-2.0, so the self-hosted total is infrastructure plus people.
| Cost component | Who is paid | One-time or recurring | What drives it |
|---|---|---|---|
| Athena per-TB scanned charge | AWS | Recurring | Bytes scanned per query, so file format, partitioning and column pruning matter; confirm the current rate on the AWS pricing page |
| Athena DPU-hour capacity | AWS | Recurring | Provisioned capacity reserved for workgroups; check the AWS pricing page for the rate and minimum in your region |
| Lambda charges for federated queries | AWS | Recurring | Invocations and duration of connector Lambdas, plus the per-TB scanned charge on federated data; confirm on the AWS pricing page |
| S3 request and storage charges | AWS | Recurring | Number of GET and LIST requests and stored bytes; these apply to Athena and to Trino reading the same bucket |
| Trino software | Nobody (Apache-2.0) | One-time setup, no license fee | Trino carries no license fee under Apache-2.0; you pay only for the infrastructure and people that run it |
| Trino coordinator and worker nodes or Kubernetes nodes | Cloud provider or your data center | Recurring | Cluster size, concurrency and query complexity; a dedicated coordinator is recommended for larger clusters |
| Table catalog (Glue, Hive Metastore or Iceberg REST) | AWS for Glue, or your team for self-run catalogs | Recurring | Glue request charges if you keep Glue, or the servers and database you run for another catalog |
| Monitoring, logging and upgrades | Your team or a services partner | Recurring | Metrics volume, alert scope and the release cadence you commit to, including Java runtime upgrades |
| On-call and platform engineering time | Your staff or a contracted partner | Recurring | Number of people on rotation, incident frequency and how much automation exists for scaling and recovery |
Why the Athena bill grows with scanned data, not with users
Athena's bill tracks how much data each query reads, not how many people run queries. Athena charges for the bytes a query scans in S3, and the same query can cost very different amounts depending on file format, partitioning and column selection. A dashboard that refreshes every few minutes re-scans the same files on every refresh, so a small team with a busy dashboard can generate more scan charges than a large team running occasional ad hoc queries. Lambda invocations for federated connectors and S3 request charges add further usage-driven lines. Before you compare models, pull the scanned-bytes and request counts for your top ten queries and check which dashboards drive them.
Trino reads the same S3 files that Athena reads, through the Iceberg or Hive connector, so the volume of data scanned does not change when you move the engine. What changes is who pays for the compute that does the reading. On Athena you pay per byte scanned or for provisioned capacity. On self-hosted Trino you pay for the coordinator and worker nodes, or the Kubernetes capacity that runs them, whether or not a query is running. That fixed cost is cheaper than scan charges only when query volume keeps the cluster busy enough, so the decision depends on your measured workload, not on headcount. Ask your team to confirm how much of the scanned volume comes from repeated dashboard refreshes, since those are the queries a result cache, a materialized table or a different file layout can reduce.
Trino queries data through connectors rather than loading it into its own storage, so the cost model has three separate budget lines that Athena hides inside one bill. Object storage holds the data and its request and egress charges, a table catalog such as an Iceberg REST catalog or Hive Metastore holds table definitions, and the Trino cluster runs the queries. Each line needs its own owner and its own quote. When you request pricing for the self-hosted option, ask for storage sizing, catalog hosting and cluster sizing as separate items, and confirm whether your object storage provider bills request and egress charges that were previously absorbed in your AWS account.
What moves the comparison for your team
Athena and self-hosted Trino share the same SQL engine lineage, so the decision turns on how your team uses it. The six drivers below determine whether per-query billing or a cluster you operate costs less, and each one needs numbers from your own query logs and staffing plans.
Daily scanned volume and repeat queries
Athena bills by data scanned, so the same dashboard refreshing over the same S3 files adds cost on every run. Higher daily scan volume and more repeated queries over unchanged data push the balance toward a cluster you run, because cluster cost does not grow with each scan. Pull scanned bytes per query from your Athena history and group them by query text to see how much of the bill is repetition. Check whether the data is partitioned and stored in columnar formats, since both change the scan size.
Iceberg connector docsConcurrency and peak hours
Athena scales per query, so bursts of parallel users cost what they scan and nothing more to hold. A self-hosted Trino cluster has fixed capacity that you pay for whether it is busy or idle, so the cost depends on how much of that capacity sits unused between peaks. Measure concurrent query count by hour over several weeks. A cluster sized for a short daily peak can be expensive for the rest of the day, and autoscaling on Kubernetes needs its own engineering effort.
Federated sources beyond S3
Athena reaches databases outside S3 through Lambda-based connectors, and those connectors add their own charges and operating work. Trino ships built-in connectors for sources such as PostgreSQL, MySQL, MongoDB and Snowflake, so the number and type of those sources changes the economics sharply. List every non-S3 source, its query frequency and whether the source can absorb extra read load. Many federated joins are better served by copying the data into the lakehouse.
Trino connector listAvailability and on-call expectations
Athena is operated by AWS, so cluster failures, upgrades and patching are not your pager. Running Trino moves coordinator and worker availability, failover, and version upgrades to your team, and that staffing cost recurs every month. Define the query availability you need, whether business hours or around the clock, and who responds to a failed coordinator at night. Fault-tolerant execution can reduce reruns of long batch queries, but it adds spooling storage to configure and monitor.
Data residency and air-gap requirements
If data must stay in your own data center or an air-gapped network, Athena is not an option, and the comparison changes from price to whether the workload can run at all. Self-hosted Trino on your own object storage keeps query traffic and results inside your boundary. Confirm where query results, spill files and logs are written, since each is a place where data leaves the query path. Ask your compliance team which of these locations count as in scope.
Skills already in the team
Trino needs people who can tune queries, manage a catalog and secure authentication, and that effort is often the largest line in a self-hosted model. A team that already runs Kubernetes, Java services and Iceberg tables carries less added cost than one that would learn all of them at once. Inventory who would own the cluster, the catalog and access control, and how many hours a month that ownership realistically takes. Ask any implementation partner to price that ongoing work separately from the initial build.
Which query pattern favors which model
Ad hoc work is irregular: an analyst runs a few exploratory queries in a week, then nothing for days. Per-terabyte-scanned billing usually wins here because nothing is charged while nobody is querying. A self-hosted Trino cluster keeps its coordinator and workers, or its Kubernetes nodes, running whether or not anyone uses them. Illustrative example: a team that runs a small number of exploratory queries each month pays for idle capacity under a self-hosted model.
- Idle capacity: Trino servers or Kubernetes nodes bill for time whether queries run or not.
- Scan size per query: Exploratory queries often touch wide tables, so a few large scans can dominate an Athena invoice.
- Operating minimum: A cluster needs upgrades, catalog maintenance and monitoring even at light use, and those hours recur.
- Crossover point: Compare monthly scanned terabytes with the fixed monthly cost of the smallest cluster you would actually run, including on-call time.
Measure scanned bytes per query and the number of active query days per month first, then ask AWS or your account team for the current Athena rate in your region.
Batch jobs run on a fixed schedule, so their data volume and frequency are known in advance. A self-hosted Trino cluster can win when large scans repeat on a predictable timetable and the cluster can be sized to that timetable or scaled down between runs. Long batch queries also raise the question of failure handling, which changes the operating picture for a self-hosted engine.
- Predictable volume: Known scan sizes and run times make both models easy to compare on paper.
- Idle gaps: A cluster that sits idle between nightly runs costs money on every idle hour, which favors per-scan billing when runs are rare.
- Fault tolerance: Trino's fault-tolerant execution is off by default; the TASK retry policy is recommended for large batch queries but needs an exchange manager spooling to S3, Azure Blob Storage, Google Cloud Storage or HDFS.
- Spool storage: Exchange spooling adds object storage capacity and requests that you size and pay for yourself.
- Reruns: Failed jobs that rerun are paid for again under per-scan billing and consume extra compute under self-hosting.
Measure scanned bytes per run, run duration and rerun rate across a typical week, then check whether the table layout keeps each scan small enough to matter.
Dashboards repeat the same queries against the same data many times a day, so cost scales with refresh frequency and data volume rather than with the number of new questions asked. This is the pattern where a self-hosted engine is most often compared with a loaded columnar database. Trino reads files in object storage on every refresh, and concurrent dashboard users add coordinator and worker load. The alternative engine pages cover ClickHouse separately, so this tab addresses Trino only.
- Refresh volume: Multiply dashboard refreshes per day by the bytes each refresh scans to estimate per-scan spend.
- Concurrency: Peak simultaneous queries set worker count, and resource groups decide which dashboards get capacity first.
- Layout and compaction: Partitioning, file sizes and Iceberg compaction determine how much each refresh scans, so tune them before buying capacity.
- Latency at peak: Users notice slow tiles during busy hours, so test tail latency at peak, not the average.
- Result caching: Check whether your BI tool caches results, since caching changes how many queries reach the engine.
Measure refresh counts, peak concurrent queries and tail latency for your most used dashboards, and confirm the caching behavior with your BI vendor.
Federated queries join lakehouse tables with operational databases such as PostgreSQL or MySQL. Under per-scan billing, the cost depends on the federated path and what each query returns from the source. In a self-hosted Trino deployment, the engine is built in with connectors, so the main cost becomes the load placed on the source systems, the network path and the time your team spends operating each connector. Trino's connector list includes PostgreSQL, MySQL, MongoDB, Oracle, SQL Server and ClickHouse, among others.
- Source load: Federated scans hit production databases, so limit them with read replicas, filters or pushdown before you tune the engine.
- Connector coverage: Check each source against the Trino connector list before choosing a model, since some sources need a different path.
- Credentials and network: Each connector needs service credentials, secret handling and network routes that your team operates.
- Cross-source joins: Joins that pull large result sets over the network consume worker memory and time.
- Per-query fees: Serverless federated paths may add a per-query charge on top of scan costs, so read the current terms for your option.
Measure rows returned per federated query, source database load during those queries and network latency to each source before deciding which model fits.
How to build the comparison with your own numbers
This sequence turns your Athena bill and query history into a like-for-like 12-month comparison against a self-hosted Trino cluster, including the staffing and migration costs that list prices leave out.
Export Athena query history and scanned bytes
The platform or data team pulls query history for each Athena workgroup over the period you want to model, using the Athena console, the query execution API or your AWS cost and usage data. Record query ID, workgroup, start time, state, data scanned and engine time for every query. Keep the export in a file you can re-run. You know this step is done when the total scanned bytes per workgroup reconciles with the usage lines on your AWS invoice for the same months.
Group queries by pattern and frequency
Cluster the exported queries by the tables they read, the time ranges they filter on and how often they repeat, since dashboards and scheduled jobs usually dominate scanned bytes. Tag each group as ad hoc, dashboard refresh, scheduled pipeline or federated. Note which groups scan the same S3 data repeatedly. You know this step is done when every scanned byte in the export is assigned to a group and the top few groups account for most of the total, which shows where a pay-per-scan model is most costly.
Inventory federated Lambda connectors and invocations
List every Athena data source that runs through a Lambda-based federated connector, with the source database, the connector version, the Lambda memory and timeout settings, and the invocation count and duration from CloudWatch for the same period. Include the Lambda and request charges attributed to each connector in your cost data. Flag any connector whose source you would reach through a native Trino connector. You know this step is done when each federated source has one row with its monthly invocation volume and its own cost line.
Price the Athena side for your region
Apply the Athena rate that AWS publishes for your region and your account to the grouped scanned bytes, and add any provisioned capacity, S3 request charges, Glue Data Catalog and Lambda costs from the same period. Check the current AWS pricing page for your region rather than relying on a figure from an earlier review, because rates and billing options change. Model two scenarios if you have committed capacity or a negotiated discount. You know this step is done when a monthly Athena total exists per workgroup and per federated connector, and each line names the rate it used and its source.
Size the Trino cluster for peak concurrency
Using the peak number of concurrent queries and the largest scans from your grouped data, estimate how many coordinator and worker nodes, and how much memory and local disk per worker, the query mix needs. Follow the Trino deployment guide for cluster shape: one coordinator plus workers, with a dedicated coordinator recommended for larger clusters, on 64-bit Linux with the Java runtime the guide specifies. If you plan to use fault-tolerant execution for long batch queries, add the spooling storage it needs. Confirm the sizing with a load test on representative queries. You know this step is done when a node count, instance type and monthly compute cost exist for the production and non-production clusters.
Add catalog, storage, monitoring and on-call hours
Add the costs that a self-hosted cluster carries and Athena does not: the table catalog (for example, an Iceberg REST catalog or Hive Metastore), object storage capacity and requests, backups, monitoring and logging, load balancing, and TLS and authentication components. Then estimate the hours your own staff spend on upgrades, patching, incident response and on-call, using your actual team roster and loaded labor rates. Ask your finance team to confirm the labor rate and on-call allocation. You know this step is done when every infrastructure and people line has an owner, a monthly value and a stated basis.
Add one-time migration effort and run 12 months
Add one-time costs for the migration: porting saved queries and views, replacing federated Lambda connectors with native Trino connectors, testing query results, building access control, and training users. Then lay both models side by side month by month for 12 months, with the migration cost placed in the months when it is spent. Include the Athena cost for the parallel-running period. Run a sensitivity check on scanned volume and on the labor hours, since those two drive the result most. You know this step is done when a 12-month table shows cumulative cost for each option and the month, if any, where the lines cross.
Request quotes against the written scope
Before you rely on the self-hosted figures, send the scope to an implementation partner or your internal team and ask for a written quote covering cluster build, catalog and storage setup, migration of queries and connectors, monitoring, documentation and handover. DeployOpen provides fixed-scope engagements and does not publish a price list, so a quote follows from the scope you agree in writing. Ask any vendor to state which assumptions its quote uses. You know this step is done when your model's implementation and support lines are replaced by quoted figures, with the assumptions documented beside them.
What Trino adds that changes the total cost
Trino changes the cost model in two places that Athena's per-scan price does not show directly. The first is connectors. Trino's connector list includes BigQuery, Snowflake, Redshift, PostgreSQL and many other sources, so a query that joins S3 data with a warehouse table can run in one engine without the per-scan Lambda charges that Athena's federated connectors carry. The cost moves instead to the Trino cluster that runs the query, the network path to each source, and the credentials and connection limits you must manage on the source side. Confirm which connectors your version ships with and whether each one supports the reads and writes your queries need, since the Snowflake connector, for example, documents one database per catalog.
The second is fault-tolerant execution, which is off by default. Trino offers a QUERY retry policy and a TASK retry policy. The TASK policy is the one the documentation recommends for large batch queries, and it needs an exchange manager that spools intermediate results to S3, Azure Blob Storage, Google Cloud Storage or HDFS. That spool is extra storage and extra S3 request traffic you pay for, and someone must size it, set its lifecycle rules and watch it fill. Every feature in this section adds infrastructure, configuration and on-call work, so the self-hosted estimate should include the spool bucket, the exchange settings, any extra source connections and the time your engineers spend testing each one. Athena's feature set and limits, including which federated sources and query behaviors apply, should be confirmed with AWS for your account and region before you compare.
Questions buyers ask before comparing Athena and Trino costs
Does self-hosting Trino always cost less than Amazon Athena?
No. Self-hosting only costs less when your query volume and staffing make the fixed cost of running Trino smaller than Athena's per-query charges. Athena bills per terabyte scanned or by provisioned DPU capacity, so light or irregular workloads often stay cheaper on Athena. Trino costs are mostly recurring: the Kubernetes nodes or servers that run the coordinator and workers, the object storage, a table catalog such as an Iceberg REST catalog or Hive Metastore, monitoring, and the engineering hours to upgrade and operate the cluster. Model both sides with your own scan volumes and headcount before deciding.
How long does a migration from Athena to self-hosted Trino take?
The duration depends on scope: how many saved queries and views you port, how many federated Lambda connectors you replace with native Trino connectors, how many workgroups you move to resource groups, and whether you change the table catalog as well as the engine. Because the data stays in S3, the data movement itself is usually not the long part. Ask any implementation partner for a timeline tied to a written scope, and confirm which catalog, authentication and access control options your environment requires before the schedule is set.
Can our team run the Trino migration without outside help?
A team can do it internally if it already has people comfortable with SQL engines, Java services, Kubernetes or VM operations, object storage, and identity integration such as LDAP, OAuth 2.0 or Kerberos. The work also needs someone who understands table formats and catalogs, including Iceberg, Hive Metastore or AWS Glue, and who can design file-based, Apache Ranger or Open Policy Agent access control. Assess these skills against your current staff. If gaps exist, a fixed-scope engagement can cover the parts you do not want to learn on production traffic.
What ongoing work does a self-hosted Trino cluster require?
Plan for recurring work in four areas. Upgrades: Trino ships new releases regularly, so you need a repeatable process for testing and rolling out versions, and Trino requires a 64-bit Java 25 runtime with a minimum of 25.0.1. Catalogs: someone maintains the Iceberg, Hive or Glue metadata and table maintenance. Monitoring: query latency, failed queries, worker health and storage throughput need dashboards and alerts. On-call: a cluster serving analysts or pipelines needs an owner for incidents outside working hours. Estimate these hours for your own team before comparing with Athena's operating model.
What should a quote for a Trino migration include?
A useful quote lists the scope in writing before work starts: the Athena workloads and saved queries in scope, the target catalog and storage layout, the deployment target (Kubernetes with Helm or virtual machines), authentication and access control design, fault-tolerant execution decisions, and the monitoring and backup setup. It should separate one-time work (design, migration, testing, documentation) from recurring work (upgrades, catalog maintenance, monitoring, support retainers). Ask for the assumptions behind the effort, what is excluded, and how acceptance is tested. Compare quotes on that basis rather than on headline totals.
Can Trino and Athena run side by side during the move?
Yes, in most setups. Because Athena and Trino both read the same data in S3, you can point Trino at the same Glue Data Catalog or Iceberg catalog while Athena keeps serving existing workloads, then move users and pipelines in stages. Trino can also reach other systems through its connectors, including BigQuery, Redshift, Snowflake and Iceberg, so a mixed period is workable. Keep the two engines consistent on table definitions and permissions during the overlap, and confirm how your catalog handles concurrent writes before moving any write workloads.
Does Trino handle the security and access controls Athena provides?
Trino covers the core needs with several options: password file, LDAP, OAuth 2.0, Kerberos, certificates and JWT for authentication, and file-based access control, Apache Ranger or Open Policy Agent for authorization. Athena's permissions run through AWS IAM and Lake Formation, so those rules must be rebuilt rather than copied. Confirm with your security and compliance teams which controls, audit logs and data handling evidence they need before you cut over. DeployOpen prepares systems and evidence for compliance assessments, but independent auditors issue any audit reports or certifications.
Moving from Athena to Trino without changing the data
The data can stay exactly where it is in Amazon S3 while the query engine changes, and that is what keeps the data-side cost stable during the comparison. Athena does not hold your data, and Trino queries data where it lives through connectors, so the S3 objects, their Parquet or ORC layout and your storage charges remain the same whichever engine reads them. The variable you are testing is the engine and its billing model, not the storage. Before you start, confirm your S3 request and storage charges for the current buckets so you can separate them from the query charges when you compare totals.
The table definitions decide how much moves. If your tables are registered in the AWS Glue Data Catalog, Trino's Iceberg or Hive connector can point at that catalog, so existing table metadata is reused. If you are moving to a new catalog, such as an Iceberg REST catalog or a Hive Metastore, the table definitions must be recreated or registered there first. Check which table formats you have (Iceberg, Delta or plain Hive partitions), because the Trino connector for each format behaves differently for writes, time travel and schema changes. Ask your Athena administrators which Lake Formation permissions apply, since those must be mapped to Trino access control before any user queries the new catalog.
Run both engines in parallel for a fixed period, sending the same representative queries to Athena and to your self-hosted Trino cluster. Compare result sets row for row, record the bytes scanned and wall-clock time per query, and log the Athena cost per query next to the Trino compute and on-call time you actually spent. Include the expensive scheduled dashboards and the ad hoc queries that users write, because they often scan very different volumes. Cut over only when results match and the cost model holds under your real workload. The step-by-step checklist for the cutover is covered in the sibling migration page on moving from Athena to Trino.
How the cost components connect in a self-hosted Trino lakehouse
The diagram starts with analysts and BI tools sending SQL to the Trino coordinator, which plans the query and hands work to the workers. Workers read Parquet or ORC files from your own object storage, while table metadata is resolved through an Iceberg REST or Hive catalog. Metrics from the coordinator and workers flow to monitoring, which is where on-call time begins. Check which components you pay for per node, which are storage requests, and which are people, because those are the lines that change with query volume.
Cost components sit on the nodes, the object storage, the catalog, monitoring and the on-call team.
How DeployOpen scopes a fixed-scope Trino implementation
DeployOpen plans and implements self-hosted Trino inside your own cloud account or data center, so the engine, catalog and access controls sit where your compliance team can review them. Engagements are fixed-scope, with scope, deliverables and timelines agreed in writing before work starts.
How we scope
- Inventory the Athena workgroups, saved queries, views and federated Lambda connectors that the written scope will cover
- Record monthly bytes scanned and DPU-hour usage so the cost comparison uses your own query volumes
- Confirm which S3 buckets, Glue or Iceberg catalogs and Lake Formation permissions Trino must read
- Agree in writing which Trino connectors, authentication methods and access control model are in scope
How we build
- Deploy Trino on your Linux hosts or Kubernetes cluster, with a coordinator and worker layout sized to your query concurrency
- Configure the catalog layer, such as Glue, Hive Metastore or an Iceberg REST catalog, against existing S3 table locations
- Port saved queries and views, and replace Lambda federated connectors with native Trino connectors where they exist
- Test fault-tolerant execution settings for long batch queries, including the spooling target for the exchange manager
How we hand over
- Deliver architecture, runbooks and a written cost model that separates Athena charges from the self-hosted components
- Document upgrade, backup of catalog metadata and monitoring steps so your on-call team can operate the cluster
- Provide access control and audit logging evidence in a form your security and compliance teams can review
- Run a parallel-query period with you to compare results and performance before cutover
How we support
- Offer ongoing support, upgrades and continuous testing as a retainer after handover
- Schedule Trino version upgrades against the release notes and retest connectors and access rules each time
- Review security settings for authentication, access control and exchange storage on a recurring basis
- Quote retainer scope separately from the initial fixed-scope engagement, based on the written requirements

