I’m the founder of Celesto AI. This article was prepared with AI assistance. Originally published on the Celesto blog.
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.
What is a self-hosted GitHub Actions runner?
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:
- GitHub-hosted runners: GitHub boots a fresh VM, runs your job, and destroys it. Zero setup, high per-minute rates (
$0.006/minfor 2 vCPU / 8 GB Linux on private repos). - Self-hosted runners on AWS: You run the open-source
actions/runneragent on EC2 instances inside your own AWS account. You pay AWS directly and own the VPC, IAM roles, images, and autoscaler. - Managed third-party runners: A provider like Blacksmith or Celesto CI hosts ephemeral Linux VMs for you. You change one
runs-online 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.
Five AWS charges that never show up in an EC2 spot calculator
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.
1. NAT Gateway hourly and per-GB data fees
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 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), and your security team has to sign off on public-subnet CI instances.
2. Internet egress and cross-AZ data transfer
AWS gives you 100 GB of internet egress free per month across your entire account. After that, EC2 Data Transfer Out 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.
3. EBS gp3 volumes, AMI snapshots, and S3 caches
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) 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.
4. CloudWatch Logs and an always-on control plane
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, 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.
5. Boot, teardown, and warm-pool idle minutes
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.
Why EC2 spot instances make your CI test suite flaky
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 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:
- Engineers blame the test suite. The GitHub UI shows a red check, not "AWS reclaimed
m8a.xlargeinus-east-1c." Someone wastes 20 minutes on a phantom flake before they spot the runner disconnect. - You pay for the job twice. If a 12-minute end-to-end suite dies at minute 10, you pay AWS for 10 dead minutes plus 12 fresh minutes on the retry, and the developer waits 22 minutes for a merge signal.
- Spot capacity dries up in bursts. Monday morning deploys and end-of-sprint freezes are the exact moments everyone else requests compute too. You end up with fallback logic to On-Demand instances, which wipes out the Spot discount during your busiest hours.
The Docker Hub rate-limit surprise
Even when Spot capacity holds, shared outbound IPs introduce a second class of random failures.
Docker Hub 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 operational work you inherit on day two
The AWS bill is only half of the total cost. The other half is the maintenance contract you sign with yourself.
- The 30-day runner deadline. GitHub requires self-hosted runners to stay within 30 days of the latest
actions/runnerrelease, or GitHub stops queue dispatch to older runners (GitHub self-hosted runner docs). You must rebuild and roll out new AMIs on a schedule, forever. - Public-repo and fork isolation. GitHub explicitly warns against persistent self-hosted runners on public repositories because an untrusted pull request can execute arbitrary code inside your VPC. Even with ephemeral microVMs, you must lock down IAM instance profiles, IMDSv2, and egress rules so a bad PR cannot reach internal AWS services.
- Autoscaler maintenance. Webhooks drop, EC2 hits vCPU service quotas, AWS retires an instance family, or a bad AMI breaks
docker buildx. When CI stops at 4 PM before a release, your highest-paid infrastructure engineer drops product work to fix the runner fleet. - GitHub's postponed self-hosted fee. On December 16, 2025, GitHub announced a
$0.002/minuteActions 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$0.002/minuteplatform fee ever returns, it adds $2,000 a week to a 1-million-minute workload, regardless of how cheap your EC2 Spot instances are.
An estimated AWS Spot bill at 1 million CI minutes a week
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):
- 50% on 2 vCPU / 8 GB:
500,000min/week - 35% on 4 vCPU / 16 GB:
350,000min/week - 15% on 8 vCPU / 32 GB:
150,000min/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 | $0.006/min | $0.012/min | $0.022/min | $10,500 | $0 | $10,500 / wk |
| Blacksmith | $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 (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 | $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.
What if your team is 20x smaller?
Divide the table by 20 for a team at 50,000 CI minutes a week (about 215,000 minutes a month):
- GitHub-hosted:
$525 / week - Blacksmith:
$360 / week - DIY AWS Spot (private subnets + NAT): fixed NAT Gateway hours ($15/wk), control plane, and S3/logs do not scale down linearly, so your AWS bill lands near
$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/hradds$150/weekin hidden labor. - Celesto CI: $60 / week, with zero AWS stack to maintain.
When self-hosted AWS runners make sense
Honesty matters here. Self-hosted AWS runners (DIY or via RunsOn) are still the right choice in three concrete situations:
- Private VPC access: Your CI jobs must reach an internal RDS database, private Artifactory, or internal microservice that cannot be exposed over the internet.
- Strict data residency or compliance: Your security policy forbids source code or build artifacts from ever entering a third-party compute account.
- Heavy AWS credits or Enterprise Discount Program (EDP) burn: You have unused AWS credits that effectively zero out your EC2, NAT, and egress charges.
Frequently asked questions
Are self-hosted GitHub Actions runners on AWS actually cheaper than GitHub-hosted?
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.
How can I avoid AWS NAT Gateway charges on self-hosted CI runners?
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.
Does GitHub charge per minute for self-hosted runners?
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.
Why do EC2 Spot instances cause flaky CI tests?
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.
