aws_codebuild_project cost estimation
A managed build environment for CI/CD. Priced per build-minute by compute type, with no idle cost between builds.
An aws_codebuild_project runs build and test jobs in a managed, on-demand environment. There's nothing always-on: you pay per build-minute, and the rate depends on the compute type (the size of the build container) and the platform.
The per-minute rate scales with compute size: general1.small is roughly $0.005/minute, general1.medium ~$0.01, general1.large ~$0.02, and the largest x-large/2xlarge and GPU/ARM variants more. The first 100 build-minutes per month on small Linux are free. Because cost is purely build-minutes, a project's monthly bill is build frequency times average duration times the per-minute rate.
c3x prices CodeBuild from the monthly build-minutes you supply in c3x-usage.yml, applying the rate for the project's compute_type. Without usage input the standing cost is zero, which is correct: an unused project costs nothing. Artifacts stored in S3 and logs in CloudWatch bill on their own resources.
Terraform example
A minimal but realistic configuration that C3X can estimate.
resource "aws_codebuild_project" "ci" {
name = "app-ci"
service_role = aws_iam_role.codebuild.arn
artifacts { type = "NO_ARTIFACTS" }
environment {
compute_type = "BUILD_GENERAL1_SMALL"
image = "aws/codebuild/amazonlinux2-x86_64-standard:5.0"
type = "LINUX_CONTAINER"
}
source {
type = "GITHUB"
location = "https://github.com/acme/app.git"
}
}Pricing dimensions
What you actually pay for when you provision aws_codebuild_project.
| Dimension | Unit | What's being charged |
|---|---|---|
| Build minutes | per minute | Per-minute rate for the compute_type, charged only while a build runs. First 100 small-Linux minutes/month free. Usage-based. $0.005/min (small), $0.01 (medium), $0.02 (large) |
Sample C3X output
Example output from c3x estimate (general1.medium, 5,000 build-minutes/month):
aws_codebuild_project.ci
└─ Build minutes (medium) 5,000 minutes $50.00
OVERALL TOTAL $50.00Optimization tips
Common ways to reduce aws_codebuild_project cost without changing the workload.
Use the smallest compute type that builds in reasonable time
Per-minute rate deltaLarger compute costs more per minute but may finish faster. The sweet spot is the smallest type where build time doesn't balloon. Benchmark a few sizes against your build's actual wall-clock.
Cache dependencies to shorten builds
Build-minute reductionBuild cost is minutes. Caching dependencies (local or S3 cache), using prebuilt base images, and parallelizing test stages cut minutes directly.
Consider ARM (Graviton) build images
10-20% per minuteARM CodeBuild images often run at a lower per-minute rate and build comparably fast for many languages. Switching the image type can trim cost with no pipeline change.
FAQ
How does c3x estimate CodeBuild cost?
It prices the monthly build-minutes you supply in c3x-usage.yml at the rate for the project's compute_type. With no usage supplied the standing cost is zero, since CodeBuild has no idle charge.
Why does an unused CodeBuild project cost nothing?
CodeBuild bills only for the minutes a build actually runs. A defined project with no builds incurs no charge, there's no provisioned environment sitting idle.
What drives the per-minute rate?
The compute_type (container size) and platform. Small Linux is cheapest; medium, large, x-large, GPU, and some ARM variants step up. Pick the smallest that builds in acceptable time.
Are build artifacts and logs included?
No. Artifacts stored in S3 and build logs in CloudWatch Logs bill on their own resources. c3x estimates those separately if they're in your Terraform.
Is there a free tier?
Yes, 100 build-minutes per month on the small Linux compute type. c3x applies the free allowance before charging.
Related resources
Estimate this resource in your own Terraform
Free, open source, no API key. C3X parses your Terraform and shows line-item cost for every resource, including aws_codebuild_project.