Study · Ilia Dubovskii · 30 November 2026

We Scanned 4,445 Public Terraform Repos for AWS Cost Waste: 2026 Results

We scanned the Terraform code of 4,445 public GitHub repositories for configuration that makes an AWS bill higher than it needs to be. Among the 740 repositories that look like real deployments, 76% of those with a NAT gateway have no S3 gateway endpoint, 65% of EKS cluster definitions pin a Kubernetes version that is past standard support, and 67% of those with versioned S3 buckets never expire old versions. This is configuration, not spend: public code shows what makes waste likely, not how much a company pays.

The short version

1. What we scanned and how

The sample is every GitHub repository whose main language is HCL, with 3 or more stars, not a fork, and pushed since 1 June 2025. GitHub search returns at most 1,000 results per query, so we listed the population in eight star ranges: 4,470 repositories, of which 4,445 could be downloaded. Only Terraform files (.tf, .tfvars) and the first part of the README were read. Nothing was executed.

Each repository was parsed with an HCL parser. Values written as variables were resolved from the variable's default, the repository's own .tfvars files and, for local modules, the value the caller passes. This matters: 55 of the 123 out-of-support EKS versions below were only visible after resolution. Values that come from outside the repository (pipelines, workspaces, remote state) are invisible, so every share is a lower bound of how often the pattern is written down.

Repositories were classed as:

Folders named examples, test, fixtures, demo and similar were excluded inside every repository, and 22 near-duplicate repositories (80% or more identical files) were removed. The headline numbers are deployments only.

Accuracy was checked against the source code, finding by finding, in an AI-assisted review recorded in the published hand-check file. In two rounds, 30 random deployment repositories were drawn and every finding was compared with the code (106 and 69 findings); rules that were wrong in more than 1 case in 10 were fixed and the scan was rerun, and the one rule changed in the last round was rechecked on 12 new findings (12 correct). Two checks that could not reach that bar (unattached Elastic IPs, and Lambda functions without an explicit log group) are left out of the results below. The instance-type and Lambda-architecture shares are direct reads of the value written in the code and were not sampled. The record of each round is published with the code.

2. The numbers

Each share is of the items named in the row (repositories, clusters, instance types, functions, log groups) found in deployments that have the resource in question, not of all repositories.

Check In deployments Share What it costs
NAT gateway, no S3 gateway endpoint212 of 28076%S3 traffic pays NAT data processing, $0.045 per GB; a gateway endpoint has no charge
NAT gateway and DynamoDB, no DynamoDB gateway endpoint48 of 6277%Same: DynamoDB traffic through the NAT
EKS version past standard support123 of 19065%$0.60 instead of $0.10 per cluster-hour, about $438 instead of $73 a month per cluster
RDS or Aurora engine version in extended support75 of 20437%An extended support fee on top of the instance: per vCPU-hour for provisioned instances, per ACU-hour for Aurora Serverless v2
ElastiCache Redis OSS 4 or 56 of 4314%ElastiCache Extended Support premium on the node price (pricing)
Repos with S3 buckets and no lifecycle rule241 of 37065%Data never moves to cheaper storage classes or expires
Repos with versioned buckets and no noncurrent version expiration138 of 20767%Every overwritten or deleted object is kept and billed
Lifecycle rules that never abort incomplete multipart uploads71 of 13055%Failed uploads are stored and billed until deleted
EBS volume types set to gp297 of 44422%gp2 $0.10 vs gp3 $0.08 per GB-month
EFS file systems with no lifecycle policy43 of 6467%Cold files stay in the Standard storage class
Instance types that are not Graviton1,295 of 1,41791%AWS lists Graviton instances at up to 20% less than comparable x86
Lambda functions on x86 (the default)426 of 52881%x86 $0.0000166667 vs Arm $0.0000133334 per GB-second
CloudWatch log groups that never expire104 of 84812%Logs are stored and billed forever
VPC Flow Logs sent to CloudWatch Logs, not S346 of 6571%Compare the two delivery prices for your volume (CloudWatch pricing)
Repos with more than one multi-region CloudTrail trail7 of 2825%The first copy of management events is free; further copies are paid
Previous-generation instance families (m4, c4, r4 ...)22 of 1,4172%Good news: almost nobody pins these any more
AWS Budget defined in code38 of 7405%A guardrail, not a cost
Cost Anomaly Detection monitor in code9 of 7401%A guardrail, not a cost

The NAT gateway rate is $0.045 per GB processed (VPC pricing); see NatGateway-Bytes on your AWS bill for how to find and fix it. The EKS rates are on the EKS pricing page; see EKS 1.34 end of support. gp2 and gp3 list prices are on the EBS pricing page. The Graviton statement is AWS's own (AWS Graviton). The Lambda duration prices are from the AWS Price List for US East (N. Virginia), first tier (usage types Lambda-GB-Second and Lambda-GB-Second-ARM); see Lambda pricing.

3. What stands out

The NAT gateway pattern is the most common and the cheapest to fix. Three in four deployments with a NAT gateway send S3 traffic through it. An S3 gateway endpoint is one Terraform resource, has no hourly or data charge, and the change is invisible to applications. It matters most for teams that pull container images or move data to S3 from private subnets, where the traffic is measured in terabytes.

Versions drift into paid support quietly. Two in three EKS cluster definitions pin a version that AWS no longer covers under standard support. In code this looks harmless (version = "1.29"), but on the bill it is six times the control-plane price. Database versions follow the same pattern at a lower rate. Both are the kind of change that waits for a sprint that never comes. Our deadline pages list the next dates.

Storage is configured to grow forever. Most deployments with buckets never move or expire data, and most with versioning keep every old version indefinitely. Neither costs much on day one; both compound.

Almost nobody puts cost guardrails in code. One deployment in twenty defines a budget; one in a hundred defines an anomaly monitor. Budget alerts are free and take one resource.

4. Limits of this study

5. Data and code

6. Have it done for you

The scan shows what is written in code; finding what it actually costs in your accounts takes the billing data, and fixing it takes pull requests someone has time to review. FinOps, paid from savings: a one-month engagement with savings in the bill within 30 days. The fee is one month of the measured saving, invoiced once; every month after is the client's. No savings, no payment. AWS, Azure and Google Cloud, any account size. Get a free savings assessment. Prefer to do it yourself? Compass is open source (Apache 2.0) and finds AWS cost waste with a savings estimate per finding.

7. Sources

8. FAQ

What are the most common AWS cost mistakes in Terraform?

In our scan of public Terraform deployments: NAT gateways without an S3 gateway endpoint (76% of setups with a NAT gateway), EKS versions past standard support (65% of cluster definitions), versioned S3 buckets that never expire old versions (67%), buckets with no lifecycle rule (65%) and Lambda functions left on x86 (81%).

How much does an EKS cluster in extended support cost?

$0.60 per cluster per hour at list price, against $0.10 in standard support: about $438 a month instead of $73 for each cluster, before any nodes.

Does an S3 gateway endpoint cost anything?

No. A gateway VPC endpoint for S3 or DynamoDB has no hourly or data processing charge, while the same traffic through a NAT gateway pays $0.045 per GB processed in US East (N. Virginia).

Can I run this scan on my own Terraform?

Yes. The scanner is published with the data. It reads .tf and .tfvars files, resolves variables where it can, and reports each check with the resources it matched.

Does this tell me how much I am wasting?

No. It shows configuration that makes waste likely. The amount depends on traffic, data volume and utilisation, which are in your billing data, not in your code.

Last checked: 30 November 2026. Scan of public repositories frozen on 30 November 2026 (commit SHAs in the dataset). Prices are AWS list prices in US East (N. Virginia).

Related: FinOps Watch · How to reduce AWS costs: the checklist · FinOps paid from savings