AWS CodeBuild is a fully managed build service. You just specify the location of your source code, choose your build settings, and CodeBuild will run build scripts for compiling, testing, and packaging your code. There are no servers to provision and scale, or software to install, configure, and operate.

AWS CodeBuild is now generally available

Try AWS CodeBuild for Free

The AWS Free Tier includes 100 build minutes of build.general1.small per month with AWS CodeBuild.

View AWS Free Tier Details »

Builds and Tests

AWS CodeBuild runs your builds in preconfigured build environments that contain the operating system, programming language runtime, and build tools (e.g., Apache Maven, Gradle, npm) required to complete the task. You just specify your source code’s location and select settings for your build, such as the build environment to use and the build commands to run during a build. AWS CodeBuild builds your code and stores the artifacts into an Amazon S3 bucket, or you can use a build command to upload them to an artifact repository. You can create, manage, and initiate build projects using AWS CodePipeline, the AWS Management Console, AWS CLIs, or SDKs.

Preconfigured Build Environments

AWS CodeBuild provides build environments for Java, Python, Node.js, Ruby, Go, Android, and Docker.

See a full list of preconfigured build environments here.

Customize Build Environments

You can bring your own build environments to use with AWS CodeBuild. You can package the runtime and tools for your build into a Docker image and upload it to a public Docker Hub repository or Amazon EC2 Container Registry (Amazon ECR). When you create a new build project, you can specify the location of your Docker image, and CodeBuild will pull the image and use it as the build project configuration.


Configurable Settings

Specify Build Commands
You can define the specific commands that you want AWS CodeBuild to perform, such as installing build tool packages, running unit tests, and packaging your code. The build specification is a YAML file that lets you choose the commands to run at each phase of the build and other settings. CodeBuild helps you get started quickly with sample build specification files for common scenarios, such as builds using Apache Maven, Gradle, or npm.

See build specification sample files here.

Select Compute Type
You can select the compute type that is best suited to your development needs. You can choose from three levels of compute capacity that vary by the amount of CPU and memory. This lets you choose higher CPU and memory compute if you want your builds to complete faster, or if your builds require a minimum level of CPU and memory to complete.

Choose Source Integrations
You can initiate builds with AWS CodeBuild in several ways. For example, you can initiate builds in CodeBuild after connecting to AWS CodeCommit, GitHub, or Amazon S3. You can also connect CodeBuild and your source repository with AWS CodePipeline, which automatically initiates a build every time you commit a change.


Continuous Integration and Delivery Workflows

AWS CodeBuild’s on-demand compute and pay-as-you-go model enable you to build and integrate code more frequently, helping you find and fix bugs early in the development process when they are easy to fix. You can integrate CodeBuild into your existing continuous integration and continuous delivery (CI/CD) workflow using its source integrations, build commands, or Jenkins integration. CodeBuild also belongs to a family of AWS Code Services that helps you practice CI/CD. You can plug CodeBuild into AWS CodePipeline, which automates building and testing code in CodeBuild each time you commit a change to your source repository. You can create this CI workflow by using the AWS CodePipeline wizard to connect your source repository and then select CodeBuild as the build provider.

You can easily extend your continuous integration workflow into continuous delivery with CodePipeline by integrating third-party load or user interface testing tools (e.g. BlazeMeter, Ghost Inspector) that initiate after CodeBuild completes the build. You can then deploy to your instances or on-premises servers using services integrated with AWS CodePipeline, such as AWS CodeDeploy and AWS Elastic Beanstalk.

AWS CodePipeline and AWS CodeBuild
AWS CodePipeline and AWS CodeBuild

Screenshot of AWS CodePipeline. This pipeline pulls source code from AWS CodeCommit, builds the code in AWS CodeBuild, and deploys the code with AWS CodeDeploy.

Use AWS CodeBuild with AWS CodePipeline
(Click to enlarge)


Security and Permissions

Your build artifacts are encrypted with customer-specific keys that are managed by the AWS Key Management Service (KMS). AWS CodeBuild is integrated with AWS Identity and Access Management so you can set granular controls over which users and AWS resources have access to your builds.


Monitoring

You can use the AWS Management Console, AWS CLI, SDKs, and APIs to view detailed information about builds. AWS CodeBuild shows you information such as the build’s start and end times, build status, commit ID and branch, and more. CodeBuild also streams build logs to Amazon CloudWatch Logs.

AWS CodeBuild
AWS CodeBuild

(Click to enlarge)