AWS CodeBuild Pricing 2026: Cost Per Build Minute and Real-World Examples
On-demand EC2 builds are billed per minute, rounded up to the next whole minute; Lambda builds per second. No monthly subscription. Updated November 2026.
AWS CodeBuild Cost Calculator
us-east-1 on-demand rates, checked November 2026 against the AWS CodeBuild pricing page.
$1/active pipeline/month (optional)
Estimates only. On-demand EC2 build time is rounded up to the nearest minute per build; Lambda compute is rounded up to the nearest second and has a hard 15-minute build cap. Excludes S3 artifact and ECR image storage. Prices checked November 2026.
How CodeBuild Pricing Works
Pay per build minute: AWS counts on-demand EC2 build time from submission to termination and rounds it up to the nearest minute. No monthly fee or seat cost. First 100 build minutes per month free on general1.small or arm1.small instances only.
| Instance type | vCPU | RAM | OS | Cost/min |
|---|---|---|---|---|
| general1.small | 2 | 3 GB | Linux | $0.005 |
| general1.medium | 4 | 7 GB | Linux | $0.010 |
| general1.large | 8 | 15 GB | Linux | $0.020 |
| arm1.small | 2 | 3 GB | Linux/Arm | $0.0034 |
| arm1.large | 8 | 16 GiB | Linux/Arm | $0.015 |
| general1.medium (Windows) | 4 | 8 GiB | Windows | $0.018 |
Lambda Compute: The Cheapest CodeBuild Option for Short Builds
The table above is the on-demand EC2 compute tier that most guides quote. CodeBuild also has a Lambda compute mode that runs the build on AWS Lambda instead of an EC2 instance. It bills per second with no 1-minute minimum, which makes it the cheapest option for fast jobs.
| Compute mode | Cheapest rate | Per minute | Free tier | Max build |
|---|---|---|---|---|
| On-demand EC2 (general1.small) | $0.005/min | $0.005 | 100 min/mo | 36 hours |
| Lambda (lambda.arm.1GB) | $0.00001/sec | ~$0.0006 | 6,000 sec/mo | 15 min |
At $0.00001/build-second, lambda.arm.1GB is roughly 8x cheaper per minute than general1.small. Larger Lambda memory sizes cost proportionally more, and x86-64 costs more than Arm, but even the top size stays below the EC2 tiers for equivalent short work. The free tier is separate too: 6,000 Lambda build seconds per month on lambda.arm.1GB or lambda.x86-64.1GB, on top of the 100 free EC2 build minutes.
The catch
Lambda compute has a hard 15-minute maximum build duration, no custom timeouts, and no privileged / Docker-in-Docker mode. It is ideal for unit tests, linting, and small package builds, but container image builds and long integration suites still need the EC2 tiers. For steady high-volume workloads, CodeBuild also offers reserved-capacity fleets (per-minute instance charges, 60-minute minimum) that can undercut on-demand EC2. Every rate on this page re-checked September 2026 against the AWS CodeBuild pricing page (US East, N. Virginia).
CodeBuild vs GitHub Actions: When AWS Wins
CodeBuild general1.small ($0.005/min) is slightly cheaper than GitHub Actions Linux ($0.006/min). But the integration context matters.
- - Builds need VPC access to private AWS resources
- - Deploying to AWS (ECS, Lambda, EKS) - IAM roles are native
- - Pulling from ECR - no network egress charges
- - Large ephemeral compute needed (general1.2xlarge with 72 vCPU)
- - Already invested in AWS CodePipeline ecosystem
- - Team is already on GitHub
- - Marketplace integrations needed (20,000+ actions)
- - macOS builds required
- - Simpler billing (no separate service costs)
- - Per-minute rate difference ($0.001/min) doesn't justify AWS complexity
CodeBuild vs CodePipeline: What You Are Actually Paying For
Common confusion: "code pipeline cost"
Many engineers search "code pipeline cost" and find confusing results because CodeBuild (the build engine) and CodePipeline (the workflow orchestrator) are separate services with separate pricing.
| Service | What it does | Cost |
|---|---|---|
| AWS CodeBuild | Executes builds. Runs your build commands. | $0.005-0.020/min |
| AWS CodePipeline | Orchestrates workflow stages. Not needed if you use CodeBuild directly. | $1/active pipeline/mo |
| Amazon ECR | Container image storage. Often used as artifact store. | ~$0.10/GB/mo |
| Amazon S3 | Build artifact storage. | ~$0.023/GB/mo |
Total AWS CI Cost Example
A team using CodeBuild + CodePipeline + S3 artifacts + ECR image registry:
| Service | Usage | Monthly cost |
|---|---|---|
| CodeBuild (general1.small) | 20,000 min/mo | $100 |
| CodePipeline | 5 active pipelines | $5 |
| S3 artifact storage | ~200 GB | $5 |
| ECR image storage | ~100 GB | $10 |
| Total | ~$120/mo |
Comparable GitHub Actions setup for 20,000 minutes: (20,000 - 3,000) x $0.006 = $102 + $16 Team plan = $118/month. Similar total cost, simpler billing.