# Why Self-Hosted GitHub Actions Runners on AWS Cost More Than the EC2 Bill

> Source: <https://dev.to/aniketmaurya/why-self-hosted-github-actions-runners-on-aws-cost-more-than-the-ec2-bill-2kle>
> Published: 2026-12-03 11:09:54+00:00

**Recommendation:** Model NAT Gateway per-GB data fees, egress and Spot-interruption reruns before choosing self-hosted runners; the source shows these nearly double a $1,135 weekly Spot bill.
More in the playbook "Controlling LLM cost": <https://wpnews.pro/playbooks/llm-cost>

I’m the founder of Celesto AI. This article was prepared with AI assistance. [Originally published on the Celesto blog](https://celesto.ai/blog/posts/aws-self-hosted-github-actions-hidden-costs/).

An EC2 Spot instance looks roughly 8x cheaper per minute than a GitHub-hosted runner. In a cost model with 1 million CI minutes a week across mixed 2, 4, and 8 vCPU jobs, raw EC2 Spot compute plus root disks lands at **$1,135 a week**, compared to **$10,500 a week** on GitHub-hosted runners.

Then the full AWS invoice arrives. NAT Gateway data fees, internet egress, spot-interruption reruns, warm-pool idle time, and control-plane services push that same self-hosted AWS setup to roughly **$1,730 to $2,100 a week**, before anyone counts engineer hours.

Here is where the extra money goes, based on AWS US East (`us-east-1`) list prices checked on December 3, 2026:

| Hidden AWS line item | AWS list price ( `us-east-1` ) | Why teams miss it in spreadsheets | 
|---|---|---|
| NAT Gateway (hourly + data) | $0.045/hr per AZ + $0.045/GB processed | Every `git clone` ,`npm install` , Docker pull, and cache transfer pays per GB | 
| Internet egress | $0.09/GB after 100 GB/mo free tier | Artifacts, container pushes, and GitHub cache uploads leave AWS | 
| Public IPv4 (if you skip NAT) | $0.005/hr per in-use IPv4 address | Adds up across hundreds of ephemeral runners and exposes public IPs | 
| Spot reclaims + boot/idle overhead | 2-minute reclaim notice; 10% to 20% wasted minutes | Jobs cannot checkpoint and resume; one failed 12-minute test costs 22 minutes | 
| Storage, logs, and control plane | gp3 $0.08/GB-mo, S3 $0.023/GB-mo, CloudWatch $0.50/GB | Always-on autoscaler, AMI snapshots, and verbose build logs never hit $0 | 

If you only need the short answer, stop there: compare your **total AWS CI bill plus engineer maintenance**, not the EC2 Spot hourly rate. If you want the architecture breakdown, the spot failure modes, and the full 1-million-minute spreadsheet, read on. Each section goes one layer deeper.

When you push a commit to GitHub, GitHub Actions runs your workflow YAML on a virtual machine called a **runner**. You have three ways to supply that machine:

`$0.006/min` for 2 vCPU / 8 GB Linux on private repos).`actions/runner` agent on EC2 instances inside your own AWS account. You pay AWS directly and own the VPC, IAM roles, images, and autoscaler.`runs-on` line in your workflow and keep your logs and artifacts in GitHub.
Self-hosted runners look irresistible on paper because GitHub charges `$0` for self-hosted minutes today, and an `m8a.large` Spot instance costs fractions of a cent per minute.

The trap is that a CI job is not pure CPU. It is a network-heavy, disk-heavy, bursty workload that starts and stops thousands of times a day.

Most teams estimate self-hosted CI with one formula: `monthly minutes x EC2 spot rate`. That formula omits the rest of the AWS VPC that keeps ephemeral runners alive and reachable.

Security best practice puts CI runners in private subnets so arbitrary build jobs do not sit on public IP addresses. Private subnets reach GitHub, npm, PyPI, and Docker Hub through a NAT Gateway.

In `us-east-1`, [AWS VPC](https://aws.amazon.com/vpc/pricing/) charges **$0.045 per hour** per NAT Gateway (about **$32.40 a month** per Availability Zone, or **$64.80 a month** across two AZs) plus **$0.045 for every GB of data** that passes through it, in either direction.

Notice that last part: **both inbound downloads and outbound uploads count**. Every Docker base image pull, every `node_modules` download, every `git clone`, and every cache restore through GitHub pays `$0.045/GB`. If 200,000 weekly jobs average 50 MB of internet traffic each, that is 10 TB a week through your NAT Gateways, or **$450 a week** in NAT data fees alone.

You can skip NAT Gateways and put ephemeral runners in public subnets with strict security groups (this is the default in tools like RunsOn). That saves the `$0.045/GB` NAT data fee, at two costs: AWS charges **$0.005 per hour** for every in-use public IPv4 address ([AWS VPC](https://aws.amazon.com/vpc/pricing/)), and your security team has to sign off on public-subnet CI instances.

AWS gives you 100 GB of internet egress free per month across your entire account. After that, [EC2 Data Transfer Out](https://aws.amazon.com/ec2/pricing/on-demand/) starts at **$0.09 per GB** in `us-east-1`.

Inbound downloads from npm or Docker Hub are free on the egress meter (though they still pay the NAT Gateway per-GB fee). Outbound traffic is not free. Every Docker image push to GHCR or Docker Hub, every GitHub Actions artifact upload, every test report, and every `actions/cache` upload back to GitHub's Azure storage leaves AWS at `$0.09/GB`.

Cross-AZ traffic inside your own VPC also costs **$0.01 per GB** each way. If your runner in `us-east-1a` talks to a shared build cache or NAT Gateway in `us-east-1b`, AWS meters every byte twice.

Every ephemeral runner needs a root volume, usually 30 GB to 100 GB of `gp3` storage, billed at **$0.08 per GB-month** in `us-east-1` ([AWS EBS](https://aws.amazon.com/ebs/pricing/)) with a 60-second minimum. If you raise baseline throughput above 125 MB/s (common for fast Docker layer extraction), AWS adds `$0.04` per provisioned MB/s-month.

To avoid `$0.09/GB` egress to GitHub's cache service, most AWS runner setups intercept `actions/cache` and store archives in an in-region S3 bucket. S3 Standard costs **$0.023 per GB-month** plus `PUT` and `GET` request fees, and you still pay for your custom AMI snapshots every month.

Your autoscaler (a fleet of Lambdas, SQS queues, Step Functions, or an EKS cluster with Actions Runner Controller) runs 24/7 even when nobody pushes code on Sunday night.

Verbose runner bootstrap logs, autoscaler traces, and VPC Flow Logs flow into [Amazon CloudWatch](https://aws.amazon.com/cloudwatch/pricing/), where log ingestion costs **$0.50 per GB** in `us-east-1` before retention storage. One noisy debug flag on a busy fleet can burn hundreds of dollars before anyone checks Cost Explorer.

GitHub bills a job only while the job runs. AWS bills an EC2 instance from the moment it enters `running` until termination completes, with a 60-second minimum on Linux.

Cold boot, cloud-init, runner registration, and teardown easily add 30 to 60 seconds to every short job. If you keep a warm pool of idle instances so developers do not wait 90 seconds for a VM to boot, you pay for every idle minute those machines sit empty between commits.

Across a real fleet, boot, teardown, warm-pool slack, and spot reruns commonly add **10% to 20%** on top of your GitHub job minutes.

The cheapest AWS CI spreadsheets always assume EC2 Spot instances. Spot discounts are real (often 60% to 75% off On-Demand), and AWS makes the trade-off explicit in its documentation.

When AWS needs capacity back, EC2 emits a [Spot Instance interruption notice](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-instance-termination-notices.html) **two minutes before termination**, on a best-effort basis.

Two minutes is enough to drain a stateless web server behind a load balancer. It is useless for a GitHub Actions job.

A CI job cannot pause mid-`pytest`, serialize its filesystem and Docker daemon, and resume on another host. When EC2 reclaims the instance, the runner dies mid-step and GitHub marks the job failed or cancelled.

Here is what happens next on a real team:

`m8a.xlarge` in `us-east-1c`." Someone wastes 20 minutes on a phantom flake before they spot the runner disconnect.
Even when Spot capacity holds, shared outbound IPs introduce a second class of random failures.

[Docker Hub](https://docs.docker.com/docker-hub/usage/) caps unauthenticated pulls at **100 pulls per 6 hours per IPv4 address**. Put 50 self-hosted runners behind one NAT Gateway, and your entire org shares one IPv4 address. By 10 AM on a Tuesday, every container build fails with `429 Too Many Requests`.

The fix is another piece of infrastructure to build and operate: a pull-through registry mirror in ECR, paid Docker Hub seats wired into every runner AMI, or per-job registry credentials rotated across every repository.

The AWS bill is only half of the total cost. The other half is the maintenance contract you sign with yourself.

`docker buildx`. When CI stops at 4 PM before a release, your highest-paid infrastructure engineer drops product work to fix the runner fleet.`$0.002/minute` Actions cloud platform charge for all self-hosted runners on private repositories, then postponed it after community pushback. GitHub stated clearly that it has real control-plane costs and plans to re-evaluate its approach. If a Let us put real numbers on a mixed-size CI workload. Take a fleet at **1,000,000 CI minutes per week** (~200,000 jobs/week at a 5-minute average, ~100 average concurrent runners):

`500,000` min/week`350,000` min/week`150,000` min/week
All provider list prices below were checked against official pages (GitHub Actions, Blacksmith, RunsOn, AWS `us-east-1`, and Celesto CI):

| Option | 2 vCPU / 8 GB | 4 vCPU / 16 GB | 8 vCPU / 32 GB | Weekly compute | Added AWS / license fees | Estimated weekly total | 
|---|---|---|---|---|---|---|
| [GitHub-hosted](https://docs.github.com/en/billing/reference/actions-runner-pricing) | $0.006/min | $0.012/min | $0.022/min | $10,500 | $0 | **$10,500 / wk** | 
| [Blacksmith](https://www.blacksmith.sh/pricing) | $0.004/min | $0.008/min | $0.016/min | $7,200 | $0 | **$7,200 / wk** | 
| DIY AWS Spot (private subnets + NAT) | ~$0.0007/min* | ~$0.0013/min* | ~$0.0022/min* | $1,135 | ~$963 (NAT, egress, +15% waste, logs/S3) | **~$2,098 / wk** + eng time | 
| DIY AWS Spot (public subnets + IPv4) | ~$0.0007/min* | ~$0.0013/min* | ~$0.0022/min* | $1,135 | ~$594 (IPv4, egress, +15% waste, logs/S3) | **~$1,729 / wk** + eng time | 
| [RunsOn](https://runs-on.com/pricing/) (AWS Spot, public subnets + S3) | ~$0.0007/min* | ~$0.0013/min* | ~$0.0022/min* | $1,135 | ~$669 (€3,600/yr tier + AWS overhead) | **~$1,804 / wk** | 
| [Celesto CI](https://celesto.ai/docs/ci#sizes-and-prices) | $0.00067/min | $0.00133/min | $0.00267/min | $1,200 | $0 (cache included, no egress fee) | **$1,200 / wk** | 

**EC2 Spot reference rates use RunsOn's published 7-day `us-east-1` averages with a 30 GB `gp3` root disk (`m8a.large`, `m8a.xlarge`, `c8id.2xlarge`). Free monthly tiers on GitHub (2,000 to 3,000 min/mo) and Blacksmith (3,000 min/mo) are negligible at 1,000,000 min/week. The DIY AWS estimate assumes 15% boot/teardown/rerun waste ($170/wk), 10 TB/wk through two NAT Gateways ($465/wk) or ~19,167 public IPv4 instance-hours ($96/wk), 3 TB/wk internet egress ($268/wk), and $60/wk for control plane, S3 cache, snapshots, and CloudWatch.*

Divide the table by 20 for a team at **50,000 CI minutes a week** (about 215,000 minutes a month):

`$525 / week`
`$360 / week`
`$115 to $130 / week`, plus the exact same maintenance burden (AMI updates, runner expiry, incident response). Even 4 hours a month of a senior engineer at `$150/hr` adds `$150/week` in hidden labor.
Honesty matters here. Self-hosted AWS runners (DIY or via RunsOn) are still the right choice in three concrete situations:

For the workload above, the estimated AWS infrastructure bill is lower than the GitHub-hosted bill. Add the time you spend on runner updates, scaling, and incidents before you compare self-hosted AWS with a managed service.

Place ephemeral runners in public subnets with inbound traffic blocked by security groups, and route dependency caches to an in-region S3 bucket through a free S3 VPC Gateway Endpoint. You still pay `$0.005/hr` per public IPv4 address and `$0.09/GB` for outbound internet egress beyond 100 GB/month.

Not right now. GitHub announced a `$0.002/minute` cloud platform charge for self-hosted runners in December 2025, then postponed it indefinitely to re-evaluate its approach. Treat it as a future budget risk rather than a guaranteed permanent `$0` line item.

AWS can reclaim a Spot instance with only two minutes of best-effort warning. Because GitHub Actions jobs cannot checkpoint state and move mid-run, any test suite active on that VM terminates abruptly and shows up as a failed build until someone reruns it.
