

# What is AWS CodeBuild?
<a name="welcome"></a>

AWS CodeBuild is a fully managed build service in the cloud. CodeBuild compiles your source code, runs unit tests, and produces artifacts that are ready to deploy. CodeBuild eliminates the need to provision, manage, and scale your own build servers. It provides prepackaged build environments for popular programming languages and build tools such as Apache Maven, Gradle, and more. You can also customize build environments in CodeBuild to use your own build tools. CodeBuild scales automatically to meet peak build requests.

CodeBuild provides these benefits:
+  **Fully managed** – CodeBuild eliminates the need to set up, patch, update, and manage your own build servers.
+  **On demand** – CodeBuild scales on demand to meet your build needs. You pay only for the number of build minutes you consume.
+  **Out of the box** – CodeBuild provides preconfigured build environments for the most popular programming languages. All you need to do is point to your build script to start your first build.

For more information, see [AWS CodeBuild](https://aws.amazon.com/codebuild/). 

## How to run CodeBuild
<a name="welcome-quick-look"></a>

You can use the AWS CodeBuild or AWS CodePipeline console to run CodeBuild. You can also automate the running of CodeBuild by using the AWS Command Line Interface (AWS CLI) or the AWS SDKs.



![\[The diagram shows how CodeBuild works with AWS CLI or AWS SDKs.\]](http://docs.aws.amazon.com/codebuild/latest/userguide/images/overview.png)




As the following diagram shows, you can add CodeBuild as a build or test action to the build or test stage of a pipeline in AWS CodePipeline. AWS CodePipeline is a continuous delivery service that you can use to model, visualize, and automate the steps required to release your code. This includes building your code. A *pipeline* is a workflow construct that describes how code changes go through a release process.



![\[The diagram shows how CodeBuild works with AWS CodePipeline.\]](http://docs.aws.amazon.com/codebuild/latest/userguide/images/pipeline.png)




To use CodePipeline to create a pipeline and then add a CodeBuild build or test action, see [Use CodeBuild with CodePipeline](how-to-create-pipeline.md). For more information about CodePipeline, see the [AWS CodePipeline User Guide](https://docs.aws.amazon.com/codepipeline/latest/userguide/).

The CodeBuild console also provides a way to quickly search for your resources, such as repositories, build projects, deployment applications, and pipelines. Choose **Go to resource** or press the `/` key, and then enter the name of the resource. Any matches appear in the list. Searches are case insensitive. You only see resources that you have permissions to view. For more information, see [Viewing resources in the console](console-resources.md). 

## Pricing for CodeBuild
<a name="welcome-pricing"></a>

For information, see [CodeBuild pricing](https://aws.amazon.com/codebuild/pricing).

## How do I get started with CodeBuild?
<a name="welcome-getting-started"></a>

We recommend that you complete the following steps:

1. **Learn** more about CodeBuild by reading the information in [Concepts](concepts.md).

1. **Experiment** with CodeBuild in an example scenario by following the instructions in [Getting started using the console](getting-started-overview.md#getting-started).

1. **Use** CodeBuild in your own scenarios by following the instructions in [Plan a build](planning.md).

# AWS CodeBuild concepts
<a name="concepts"></a>

The following concepts are important for understanding how CodeBuild works.

**Topics**
+ [

## How CodeBuild works
](#concepts-how-it-works)
+ [

## Next steps
](#concepts-next-steps)

## How CodeBuild works
<a name="concepts-how-it-works"></a>

The following diagram shows what happens when you run a build with CodeBuild: 



![\[A diagram of how running a build with CodeBuild works.\]](http://docs.aws.amazon.com/codebuild/latest/userguide/images/arch.png)




1. As input, you must provide CodeBuild with a build project. A *build project* includes information about how to run a build, including where to get the source code, which build environment to use, which build commands to run, and where to store the build output. A *build environment* represents a combination of operating system, programming language runtime, and tools that CodeBuild uses to run a build. For more information, see:
   + [Create a build project](create-project.md)
   + [Build environment reference](build-env-ref.md)

1. CodeBuild uses the build project to create the build environment.

1. CodeBuild downloads the source code into the build environment and then uses the build specification (buildspec), as defined in the build project or included directly in the source code. A *buildspec* is a collection of build commands and related settings, in YAML format, that CodeBuild uses to run a build. For more information, see the [Buildspec reference](build-spec-ref.md).

1. If there is any build output, the build environment uploads its output to an S3 bucket. The build environment can also perform tasks that you specify in the buildspec (for example, sending build notifications to an Amazon SNS topic). For an example, see [Build notifications sample](sample-build-notifications.md).

1. While the build is running, the build environment sends information to CodeBuild and Amazon CloudWatch Logs.

1. While the build is running, you can use the AWS CodeBuild console, AWS CLI, or AWS SDKs to get summarized build information from CodeBuild and detailed build information from Amazon CloudWatch Logs. If you use AWS CodePipeline to run builds, you can get limited build information from CodePipeline.

## Next steps
<a name="concepts-next-steps"></a>

Now that you know more about AWS CodeBuild, we recommend these next steps:

1. **Experiment** with CodeBuild in an example scenario by following the instructions in [Getting started using the console](getting-started-overview.md#getting-started).

1. **Use** CodeBuild in your own scenarios by following the instructions in [Plan a build](planning.md).