ci-cdawscost-estimationdeveloper-experience

How much does it cost to run a CI/CD build farm?

A build farm running 36,000 jobs a month for 120 engineers costs about 1,165 dollars on self-hosted Spot instances, against 2,304 dollars on hosted runners. Here is the breakdown and where the crossover actually sits.

The C3X Team··7 min read

Quick answer

A CI/CD build farm handling 36,000 jobs a month (1,200 a day, 8 minutes average, 4 vCPU each) for 120 engineers costs roughly 1,165 dollars a month self-hosted on Spot instances, against about 2,304 dollars on hosted runners at 0.008 dollars per minute. That is 0.032 dollars per job and 9.71 dollars per engineer per month self-hosted. The non-obvious lines are artifact and cache request fees at 81 dollars and NAT gateway charges at 168 dollars, both of which come from pulling dependencies and pushing artifacts rather than from compute.

CI cost is usually discussed as a per-minute rate, which hides most of what you actually pay for. A build farm is not just compute: it is disk, container registry storage, artifact and cache traffic, an orchestrator, and a surprising amount of egress from pulling dependencies. Here is the full picture.

The workload we are pricing

Assume an engineering organization of 120 people in us-east-1 producing about 400 commits a day across 40 repositories. Each commit triggers roughly three jobs (lint, test, build), giving 1,200 jobs a day or 36,000 a month. The average job runs 8 minutes on 4 vCPU, so monthly compute demand is 288,000 job-minutes, or 4,800 job-hours. Jobs pull container base images and language dependencies, write test artifacts, and push built images to a registry. Utilisation is spiky: most jobs land between 10am and 6pm on weekdays.

The monthly breakdown, self-hosted on Spot

ComponentSpecificationMonthly cost
Build compute6,480 c5.xlarge Spot hours at about 0.055/hr (35% idle overhead)$356.40
Logs400 GB ingest plus retention$212.00
Orchestrator2 x m5.large plus db.t3.medium with 100 GB$201.30
NAT gateway1 gateway plus 3 TB of dependency and image pulls$167.85
Runner disks1,200 GB gp3 average attached at 0.08/GB$96.00
Artifact and cache storage2 TB S3 plus 30M requests$81.00
Container registry500 GB of images at 0.10/GB$50.00
Total$1,164.55

Compute is only 31 percent of a build farm

The headline number everyone compares is per-minute compute, but here it is 356 dollars out of 1,165. The other 69 percent is infrastructure around the builds. Two lines deserve attention.

The NAT gateway at 167.85 dollars exists because every job pulls base images, npm or pip packages, and Go modules from the public internet through private subnets. Three terabytes a month of dependency traffic at 0.045 per gigabyte processing is 135 dollars on top of the 32.85 dollar hourly charge. Two fixes apply: VPC endpoints for the container registry and object storage, which move that traffic off the NAT gateway at 0.01 per gigabyte, and an internal package mirror so the same dependency is not fetched 1,200 times a day. Together these usually cut the line to under 40 dollars. It is the same pattern described inNAT gateway cost optimization.

Artifact storage at 81 dollars is mostly request fees, not storage. Two terabytes of artifacts costs 46 dollars; the other 35 comes from 5 million PUT requests at 0.005 per thousand and 25 million GETs. Caches that write thousands of small files per job are the cause, and tarring the cache into a single object before upload typically cuts request fees by 90 percent, a pattern covered inthe S3 request cost surprise.

Self-hosted against hosted runners

OptionRateMonthly for 288,000 job-minutes
Hosted runners, 2-core$0.008/min$2,304
Managed build service, medium$0.010/min$2,880
Self-hosted on-demand c5.xlarge$0.170/hrabout $1,625 all-in
Self-hosted on Spot c5.xlargeabout $0.055/hr$1,165 all-in

Self-hosting on Spot is roughly half the cost of hosted runners at this volume. But the comparison is incomplete without operational cost. Someone has to maintain the runner images, handle Spot interruptions mid-build, patch the orchestrator, and debug the day a dependency mirror breaks. At a loaded engineering cost of 100 dollars an hour, 12 hours of maintenance a month erases the entire saving.

The practical crossover is around 10,000 to 15,000 job-minutes a day. Below that, hosted runners cost a few hundred dollars and self-hosting is not worth anyone's time. Above it, the saving becomes large enough that a part-time owner is justified, and the non-cost benefits (bigger machines, warm caches, private network access) usually matter more than the money anyway.

The levers that work

ChangeEffectMonthly saving
Spot instead of on-demand68% lower compute rate$460
VPC endpoints plus package mirrorRemoves NAT processing$128
Tar caches before upload90% fewer requests$31
Skip unaffected jobs on monorepo changes30% fewer jobs$107
Trim build log verbosity60% less ingest$127

The largest non-compute lever is not an infrastructure change at all: only running the jobs that a change actually affects. In a monorepo, a typical commit touches one service but triggers the full matrix. Path filtering and affected-target detection routinely remove 30 to 50 percent of jobs, which reduces compute, disk, artifact traffic, and logs simultaneously.

The number to report

At 1,165 dollars for 120 engineers, CI costs 9.71 dollars per engineer per month, or 0.032 dollars per job. Both are useful: cost per engineer tells finance whether the platform is proportionate, and cost per job tells the platform team whether pipelines are getting more or less efficient. Price the farm from Terraform against the resource catalog, and the answer to "should we self-host?" stops being a hunch. More CI levers are collected inCI/CD cost optimization.

FAQ

How much does a CI/CD build farm cost?

About 1,165 dollars a month self-hosted on Spot instances for 36,000 jobs (288,000 job-minutes) serving 120 engineers, including compute, runner disks, orchestrator, container registry, artifact storage, NAT gateway, and logs. That is 0.032 dollars per job and 9.71 dollars per engineer per month. The same volume on hosted runners at 0.008 per minute costs about 2,304 dollars.

Is self-hosting CI runners cheaper than hosted runners?

At volume, yes: roughly half the cost. 288,000 job-minutes is 2,304 dollars on hosted runners against about 1,165 dollars self-hosted on Spot, all-in. But operational cost closes the gap: maintaining runner images, handling Spot interruptions, and patching the orchestrator at a loaded 100 dollars an hour erases the saving in about 12 hours a month. The crossover is around 10,000 to 15,000 job-minutes a day.

Why is compute only a third of build farm cost?

Because builds generate traffic and storage, not just CPU time. Here compute is 356 dollars of 1,165. Logs are 212 dollars, the orchestrator 201, NAT gateway processing for dependency pulls 168, runner disks 96, artifact and cache requests 81, and registry storage 50. The per-minute rate that dominates CI pricing conversations covers less than a third of what the farm actually costs.

How do I reduce CI infrastructure costs?

Run fewer jobs first: path filtering and affected-target detection in a monorepo typically remove 30 to 50 percent of jobs and cut compute, disk, artifacts, and logs at once, worth about 107 dollars here. Then use Spot (460 dollars), add VPC endpoints and a package mirror to bypass NAT processing (128 dollars), trim log verbosity (127 dollars), and tar caches before upload to cut request fees (31 dollars).

Why does my CI pipeline generate NAT gateway charges?

Because every job pulls container base images and language packages from the public internet through private subnets, and NAT gateways charge 0.045 per gigabyte processed on top of the hourly fee. Three terabytes a month of dependency traffic is 135 dollars. VPC endpoints for the container registry and object storage move that traffic to 0.01 per gigabyte, and an internal package mirror stops the same dependency being fetched 1,200 times a day.

How does C3X help price CI infrastructure?

C3X reads your Terraform and prices runner fleets, disks, registries, NAT gateways, and storage against a live catalog, so the full cost of a build farm is visible rather than just the per-minute compute rate. That makes the self-hosted versus hosted comparison an actual number, and it flags the supporting lines (NAT processing, artifact request fees) that usually go unbudgeted.

What to do next

Cost your build farm properly, not just the compute. C3X reads your Terraform and prices your resources against a live catalog. Start with the quickstart.

Try C3X on your own Terraform

Free and open source. No API key required. One command to install, one command to estimate.