AWS CodeBuild uses simple pay-as-you-go pricing. There are no upfront costs or minimum fees. You pay only for the resources you use. You are charged for compute resources based on the duration it takes for your build to execute. The rate depends on the selected compute type.

On-Demand EC2 pricing

Build duration

Build Duration is calculated in minutes, from the time you submit your build until your build is terminated, rounded up to the nearest minute.

Compute types

AWS CodeBuild offers compute instance types with different amounts of memory and CPU. Charges vary by the compute instance type that you choose for your build.

On-Demand Lambda pricing

Build duration

Build Duration is calculated in seconds, from the time you submit your build until your build is terminated, rounded up to the nearest second.

Compute types

AWS CodeBuild offers compute types with different amounts of memory. Charges vary by the compute type that you choose for your build.

Reserved Capacity EC2 pricing

Instance pricing per minute

Instance pricing is calculated in minutes, from the time you submit a request for a new instance until your instance is terminated, rounded up to the nearest minute. Each instance has a minimum usage charge of 60 minutes.

Compute types

AWS CodeBuild offers compute instance types with different amounts of memory and CPU. Charges vary by the compute instance type that you choose for your fleet.

Free Tier

The AWS CodeBuild free tier includes 100 total build minutes per month with the general1.small or arm1.small instance types using on-demand EC2. Using on-demand Lambda, the AWS CodeBuild free tier includes 6,000 total build seconds per month with the lambda.arm.1GB or lambda.x86-64.1GB compute types. Reserved capacity EC2 does not offer a free tier. The CodeBuild free tier does not expire automatically at the end of your 12-month AWS Free Tier term. It is available to new and existing AWS customers.

Additional charges

You may incur additional charges if your builds transfer data or use other AWS services. For example, you may incur charges from Amazon CloudWatch Logs for build log streams, Amazon S3 for build artifact storage, and AWS Key Management Service for encryption. You may also incur additional charges if you use AWS CodeBuild with AWS CodePipeline.

Pricing example

On-Demand EC2 pricing example

If you execute 100 builds in one month using build.general1.small where each build runs for 5 minutes, then your charges would be calculated as follows:

Monthly build charges

Build minutes = 100 builds * 5 minutes = 500 build minutes

Build minutes – Free tier build minutes = Monthly billable build minutes = 500 – 100 = 400 build minutes

Monthly build charges = 400 build minutes * $0.005 = $2

On-Demand Lambda pricing example

If you execute 100 builds in one month using lambda.arm.1GB where each build runs for 300 seconds, then your charges would be calculated as follows:

Monthly build charges

Build seconds = 100 builds * 300 seconds = 30,000 build seconds

Build seconds – Free tier build seconds = Monthly billable build seconds = 30,000 – 6,000 = 24,000 build seconds

Monthly build charges = 24,000 build seconds * $0.00001 = $0.24

Reserved Capacity EC2 pricing example

If you reserve 1 instance for one month using reserved.x86-64.g1.small, then your charges would be calculated as follows:

Monthly build charges

Instance minutes = 60 minutes per hour * 24 hours per day * 30 days per month = 43,200

Monthly reserved charges = 43,200 instance minutes * $0.003 = $129.60

Additional pricing resources

AWS Pricing Calculator

Easily calculate your monthly costs with AWS.

Get pricing assistance

Contact AWS specialists to get a personalized quote.

Learn how to get started with AWS CodeBuild

Visit the getting started page
Ready to build?
Get started with AWS CodeBuild
Have more questions?
Contact us