AWS CodeBuild features

Why CodeBuild?

AWS CodeBuild is a fully managed continuous integration 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.

Build and test your code

CodeBuild runs your builds in preconfigured build environments that contain the operating system, programming language runtime, and build tools (for example, 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 CLI, or SDKs.

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

See a full list of preconfigured build environments

You can bring your own build environments to use with AWS CodeBuild, such as for the Microsoft .NET Framework. 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 Elastic 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

You can define the specific commands that you want 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 along with other settings. CodeBuild helps you quickly get started with sample build specification files for common scenarios, such as builds using Apache Maven, Gradle, or npm.

See build specification sample files

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.  CodeBuild supports Linux and Windows operating systems.

You can initiate builds with CodeBuild in several ways. For example, you can initiate builds in CodeBuild after connecting to AWS CodeCommit, GitHub, GitHub Enterprise, Bitbucket, or Amazon Simple Storage Service (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.

General

On-demand compute resources and pay-as-you-go pricing in CodeBuild allow you to more frequently build and integrate code, 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 help you practice CI/CD. You can plug CodeBuild into 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 CodePipeline wizard to connect your source repository and then selecting 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 (for example, BlazeMeter or Ghost Inspector) that initiate after CodeBuild completes the build. You can then deploy to your instances or on-premises servers using services integrated with CodePipeline, such as AWS CodeDeploy and AWS Elastic Beanstalk.

Your build artifacts are encrypted with customer-specific keys that are managed by the AWS Key Management Service (AWS KMS). 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.

You can use the CodeBuild console, AWS Command Line Interface (AWS CLI), SDKs, and APIs, or Amazon CloudWatch to view detailed information about your builds. CodeBuild shows you information such as the build’s start time, end time, status, and commit ID. CodeBuild also streams build metrics and logs to CloudWatch. You can use CloudWatch to create a custom dashboard, set an Amazon CloudWatch Alarm, troubleshoot build issues, or inspect build logs.

You can create notifications for events impacting your build projects. Notifications will come in the form of Amazon Simple Notification Service (Amazon SNS) notifications. Each notification includes a status message and a link to the resources whose event generated that notification.