

# Build environment reference for AWS CodeBuild
<a name="build-env-ref"></a>

When you call AWS CodeBuild to run a build, you must provide information about the build environment. A *build environment* represents a combination of operating system, programming language runtime, and tools that CodeBuild uses to run a build. For information about how a build environment works, see [How CodeBuild works](concepts.md#concepts-how-it-works).

A build environment contains a Docker image. For information, see [the Docker glossary](https://docs.docker.com/glossary/?term=image) on the Docker Docs website. 

When you provide information to CodeBuild about the build environment, you specify the identifier of a Docker image in a supported repository type. These include the CodeBuild Docker image repository, publicly available images in Docker Hub, and Amazon Elastic Container Registry (Amazon ECR) repositories that your AWS account has permissions to access.
+ We recommend that you use Docker images stored in the CodeBuild Docker image repository, because they are optimized for use with the service. For more information, see [Docker images provided by CodeBuild](build-env-ref-available.md). 
+ To get the identifier of a publicly available Docker image stored in Docker Hub, see [Searching for Repositories](https://docs.docker.com/docker-hub/repos/#searching-for-repositories) on the Docker Docs website.
+ To learn how to work with Docker images stored in Amazon ECR repositories in your AWS account, see [Amazon ECR sample](sample-ecr.md).

In addition to a Docker image identifier, you also specify a set of computing resources that the build environment uses. For more information, see [Build environment compute modes and types](build-env-ref-compute-types.md).

**Topics**
+ [Docker images provided by CodeBuild](build-env-ref-available.md)
+ [Build environment compute modes and types](build-env-ref-compute-types.md)
+ [Shells and commands in build environments](build-env-ref-cmd.md)
+ [Environment variables in build environments](build-env-ref-env-vars.md)
+ [Background tasks in build environments](build-env-ref-background-tasks.md)

# Docker images provided by CodeBuild
<a name="build-env-ref-available"></a>

A *supported image* is the latest major version of an image available in CodeBuild and is updated with minor and patch version updates. CodeBuild optimizes the provisioning duration of builds with supported images by caching them in the machine's [Amazon Machine Images (AMI)](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AMIs.html#ami-using). If you want to benefit from caching and minimize the provisioning duration of your build, select **Always use the latest image for this runtime version** in the **Image version** section of the CodeBuild console instead of a more granular version, such as `aws/codebuild/amazonlinux-x86_64-standard:4.0-1.0.0`.

**Topics**
+ [Obtain the list of current Docker images](build-env-ref-available-get.md)
+ [EC2 compute images](ec2-compute-images.md)
+ [Lambda compute images](lambda-compute-images.md)
+ [Deprecated CodeBuild images](deprecated-images.md)
+ [Available runtimes](available-runtimes.md)
+ [Runtime versions](runtime-versions.md)

# Obtain the list of current Docker images
<a name="build-env-ref-available-get"></a>

CodeBuild frequently updates the list of Docker images to add the latest images and deprecate old images. To get the most current list, do one of the following:
+ In the CodeBuild console, in the **Create build project** wizard or **Edit Build Project** page, for **Environment image**, choose **Managed image**. Choose from the **Operating system**, **Runtime**, and **Runtime version** drop-down lists. For more information, see [Create a build project (console)](create-project.md#create-project-console) or [Change a build project's settings (console)](change-project.md#change-project-console).
+ For the AWS CLI, run the `list-curated-environment-images` command:

  ```
  aws codebuild list-curated-environment-images
  ```
+ For the AWS SDKs, call the `ListCuratedEnvironmentImages` operation for your target programming language. For more information, see the [AWS SDKs and tools reference](sdk-ref.md).

# EC2 compute images
<a name="ec2-compute-images"></a>

AWS CodeBuild supports the following Docker images that are available for EC2 compute in CodeBuild.

**Note**  
The base image of the Windows Server Core 2019 platform is only available in the following regions:  
US East (N. Virginia)
US East (Ohio)
US West (Oregon)
Europe (Ireland)


| Platform | Image identifier | Definition | 
| --- | --- | --- | 
| Amazon Linux 2 | aws/codebuild/amazonlinux-x86\$164-standard:4.0 | [al/standard/4.0](https://github.com/aws/aws-codebuild-docker-images/tree/master/al/x86_64/standard/4.0) | 
| Amazon Linux 2023 | aws/codebuild/amazonlinux-x86\$164-standard:5.0 | [al/standard/5.0](https://github.com/aws/aws-codebuild-docker-images/tree/master/al/x86_64/standard/5.0) | 
| Amazon Linux 2023 | aws/codebuild/amazonlinux-x86\$164-standard:6.0 | [al/standard/6.0](https://github.com/aws/aws-codebuild-docker-images/tree/master/al/x86_64/standard/6.0) | 
| Amazon Linux 2 | aws/codebuild/amazonlinux-x86\$164-standard:corretto8 | [al/standard/corretto8](https://github.com/aws/aws-codebuild-docker-images/tree/master/al/x86_64/standard/corretto8) | 
| Amazon Linux 2 | aws/codebuild/amazonlinux-x86\$164-standard:corretto11 | [al/standard/corretto11](https://github.com/aws/aws-codebuild-docker-images/tree/master/al/x86_64/standard/corretto11) | 
| Amazon Linux 2 | aws/codebuild/amazonlinux-aarch64-standard:2.0 | [al/aarch64/standard/2.0](https://github.com/aws/aws-codebuild-docker-images/tree/master/al/aarch64/standard/2.0) | 
| Amazon Linux 2023 | aws/codebuild/amazonlinux-aarch64-standard:3.0 | [al/aarch64/standard/3.0](https://github.com/aws/aws-codebuild-docker-images/tree/master/al/aarch64/standard/3.0) | 
| Ubuntu 20.04 | aws/codebuild/standard:5.0 | [ubuntu/standard/5.0](https://github.com/aws/aws-codebuild-docker-images/tree/master/ubuntu/standard/5.0) | 
| Ubuntu 22.04 | aws/codebuild/standard:6.0 | [ubuntu/standard/6.0](https://github.com/aws/aws-codebuild-docker-images/tree/master/ubuntu/standard/6.0) | 
| Ubuntu 22.04 | aws/codebuild/standard:7.0 | [ubuntu/standard/7.0](https://github.com/aws/aws-codebuild-docker-images/tree/master/ubuntu/standard/7.0) | 
| Ubuntu 24.04 | aws/codebuild/standard:8.0 | [ubuntu/standard/8.0](https://github.com/aws/aws-codebuild-docker-images/tree/master/ubuntu/standard/8.0) | 
| Windows Server Core 2019 | aws/codebuild/windows-base:2019-1.0 | N/A | 
| Windows Server Core 2019 | aws/codebuild/windows-base:2019-2.0 | N/A | 
| Windows Server Core 2019 | aws/codebuild/windows-base:2019-3.0 | N/A | 
| Windows Server Core 2022 | aws/codebuild/windows-base:2022-1.0 | N/A | 

**Note**  
On November 22nd, 2024, the aliases for Linux-based standard runtime images were updated from `amazonlinux2` to `amazonlinux`. No manual update is required as the previous aliases are still valid.

# Lambda compute images
<a name="lambda-compute-images"></a>

AWS CodeBuild supports the following Docker images that are available for AWS Lambda compute in CodeBuild.

**Important**  
The `on-failure` attribute is not supported when using Lambda compute or reserved capacity. This attribute only works with EC2 compute images provided by CodeBuild.


**`aarch64` Architecture**  

| Platform | Image identifier | Definition | 
| --- | --- | --- | 
| Amazon Linux 2 | aws/codebuild/amazonlinux-aarch64-lambda-standard:dotnet6 | [al-lambda/aarch64/dotnet6](https://github.com/aws/aws-codebuild-docker-images/tree/master/al-lambda/aarch64/dotnet6) | 
| Amazon Linux 2023 | aws/codebuild/amazonlinux-aarch64-lambda-standard:dotnet8 | [al-lambda/aarch64/dotnet8](https://github.com/aws/aws-codebuild-docker-images/tree/master/al-lambda/aarch64/dotnet8) | 
| Amazon Linux 2 | aws/codebuild/amazonlinux-aarch64-lambda-standard:go1.21 | [al-lambda/aarch64/go1.21](https://github.com/aws/aws-codebuild-docker-images/tree/master/al-lambda/aarch64/go1.21) | 
| Amazon Linux 2023 | aws/codebuild/amazonlinux-aarch64-lambda-standard:go1.24 | [al-lambda/aarch64/go1.24](https://github.com/aws/aws-codebuild-docker-images/tree/master/al-lambda/aarch64/go1.24) | 
| Amazon Linux 2 | aws/codebuild/amazonlinux-aarch64-lambda-standard:corretto11 | [al-lambda/aarch64/corretto11](https://github.com/aws/aws-codebuild-docker-images/tree/master/al-lambda/aarch64/corretto11) | 
| Amazon Linux 2 | aws/codebuild/amazonlinux-aarch64-lambda-standard:corretto17 | [al-lambda/aarch64/corretto17](https://github.com/aws/aws-codebuild-docker-images/tree/master/al-lambda/aarch64/corretto17) | 
| Amazon Linux 2023 | aws/codebuild/amazonlinux-aarch64-lambda-standard:corretto21 | [al-lambda/aarch64/corretto21](https://github.com/aws/aws-codebuild-docker-images/tree/master/al-lambda/aarch64/corretto21) | 
| Amazon Linux 2 | aws/codebuild/amazonlinux-aarch64-lambda-standard:nodejs18 | [al-lambda/aarch64/nodejs18](https://github.com/aws/aws-codebuild-docker-images/tree/master/al-lambda/aarch64/nodejs18) | 
| Amazon Linux 2023 | aws/codebuild/amazonlinux-aarch64-lambda-standard:nodejs20 | [al-lambda/aarch64/nodejs20](https://github.com/aws/aws-codebuild-docker-images/tree/master/al-lambda/aarch64/nodejs20) | 
| Amazon Linux 2023 | aws/codebuild/amazonlinux-aarch64-lambda-standard:nodejs22 | [al-lambda/aarch64/nodejs22](https://github.com/aws/aws-codebuild-docker-images/tree/master/al-lambda/aarch64/nodejs22) | 
| Amazon Linux 2 | aws/codebuild/amazonlinux-aarch64-lambda-standard:python3.11 | [al-lambda/aarch64/python3.11](https://github.com/aws/aws-codebuild-docker-images/tree/master/al-lambda/aarch64/python3.11) | 
| Amazon Linux 2023 | aws/codebuild/amazonlinux-aarch64-lambda-standard:python3.12 | [al-lambda/aarch64/python3.12](https://github.com/aws/aws-codebuild-docker-images/tree/master/al-lambda/aarch64/python3.12) | 
| Amazon Linux 2023 | aws/codebuild/amazonlinux-aarch64-lambda-standard:python3.13 | [al-lambda/aarch64/python3.13](https://github.com/aws/aws-codebuild-docker-images/tree/master/al-lambda/aarch64/python3.13) | 
| Amazon Linux 2 | aws/codebuild/amazonlinux-aarch64-lambda-standard:ruby3.2 | [al-lambda/aarch64/ruby3.2](https://github.com/aws/aws-codebuild-docker-images/tree/master/al-lambda/aarch64/ruby3.2) | 
| Amazon Linux 2023 | aws/codebuild/amazonlinux-aarch64-lambda-standard:ruby3.4 | [al-lambda/aarch64/ruby3.4](https://github.com/aws/aws-codebuild-docker-images/tree/master/al-lambda/aarch64/ruby3.4) | 


**`x86_64` Architecture**  

| Platform | Image identifier | Definition | 
| --- | --- | --- | 
| Amazon Linux 2 | aws/codebuild/amazonlinux-x86\$164-lambda-standard:dotnet6 | [al-lambda/x86\$164/dotnet6](https://github.com/aws/aws-codebuild-docker-images/tree/master/al-lambda/x86_64/dotnet6) | 
| Amazon Linux 2023 | aws/codebuild/amazonlinux-x86\$164-lambda-standard:dotnet8 | [al-lambda/x86\$164/dotnet8](https://github.com/aws/aws-codebuild-docker-images/tree/master/al-lambda/x86_64/dotnet8) | 
| Amazon Linux 2 | aws/codebuild/amazonlinux-x86\$164-lambda-standard:go1.21 | [al-lambda/x86\$164/go1.21](https://github.com/aws/aws-codebuild-docker-images/tree/master/al-lambda/x86_64/go1.21) | 
| Amazon Linux 2023 | aws/codebuild/amazonlinux-x86\$164-lambda-standard:go1.24 | [al-lambda/x86\$164/go1.24](https://github.com/aws/aws-codebuild-docker-images/tree/master/al-lambda/x86_64/go1.24) | 
| Amazon Linux 2 | aws/codebuild/amazonlinux-x86\$164-lambda-standard:corretto11 | [al-lambda/x86\$164/corretto11](https://github.com/aws/aws-codebuild-docker-images/tree/master/al-lambda/x86_64/corretto11) | 
| Amazon Linux 2 | aws/codebuild/amazonlinux-x86\$164-lambda-standard:corretto17 | [al-lambda/x86\$164/corretto17](https://github.com/aws/aws-codebuild-docker-images/tree/master/al-lambda/x86_64/corretto17) | 
| Amazon Linux 2023 | aws/codebuild/amazonlinux-x86\$164-lambda-standard:corretto21 | [al-lambda/x86\$164/corretto21](https://github.com/aws/aws-codebuild-docker-images/tree/master/al-lambda/x86_64/corretto21) | 
| Amazon Linux 2 | aws/codebuild/amazonlinux-x86\$164-lambda-standard:nodejs18 | [al-lambda/x86\$164/nodejs18](https://github.com/aws/aws-codebuild-docker-images/tree/master/al-lambda/x86_64/nodejs18) | 
| Amazon Linux 2023 | aws/codebuild/amazonlinux-x86\$164-lambda-standard:nodejs20 | [al-lambda/x86\$164/nodejs20](https://github.com/aws/aws-codebuild-docker-images/tree/master/al-lambda/x86_64/nodejs20) | 
| Amazon Linux 2023 | aws/codebuild/amazonlinux-x86\$164-lambda-standard:nodejs22 | [al-lambda/x86\$164/nodejs22](https://github.com/aws/aws-codebuild-docker-images/tree/master/al-lambda/x86_64/nodejs22) | 
| Amazon Linux 2 | aws/codebuild/amazonlinux-x86\$164-lambda-standard:python3.11 | [al-lambda/x86\$164/python3.11](https://github.com/aws/aws-codebuild-docker-images/tree/master/al-lambda/x86_64/python3.11) | 
| Amazon Linux 2023 | aws/codebuild/amazonlinux-x86\$164-lambda-standard:python3.12 | [al-lambda/x86\$164/python3.12](https://github.com/aws/aws-codebuild-docker-images/tree/master/al-lambda/x86_64/python3.12) | 
| Amazon Linux 2023 | aws/codebuild/amazonlinux-x86\$164-lambda-standard:python3.13 | [al-lambda/x86\$164/python3.13](https://github.com/aws/aws-codebuild-docker-images/tree/master/al-lambda/x86_64/python3.13) | 
| Amazon Linux 2 | aws/codebuild/amazonlinux-x86\$164-lambda-standard:ruby3.2 | [al-lambda/x86\$164/ruby3.2](https://github.com/aws/aws-codebuild-docker-images/tree/master/al-lambda/x86_64/ruby3.2) | 
| Amazon Linux 2023 | aws/codebuild/amazonlinux-x86\$164-lambda-standard:ruby3.4 | [al-lambda/x86\$164/ruby3.4](https://github.com/aws/aws-codebuild-docker-images/tree/master/al-lambda/x86_64/ruby3.4) | 

# Deprecated CodeBuild images
<a name="deprecated-images"></a>

A *deprecated image* is an image that is no longer cached or updated by CodeBuild. A deprecated image no longer receives minor version updates or patch version updates, and because they are no longer updated, using them may not be secure. If your CodeBuild project is configured to use an older image version, the provisioning process will download this docker image and use it to create the containerized runtime environment, which can increase the provisioning duration and overall build duration.

CodeBuild has deprecated the following Docker images. You can still use these images, but they won't be cached on the build host and will result in higher provisioning times.


| Platform | Image identifier | Definition | Deprecation date | 
| --- | --- | --- | --- | 
| Amazon Linux 2 | aws/codebuild/amazonlinux2-x86\$164-standard:3.0 | al2/standard/3.0 | May 9, 2023 | 
| Ubuntu 18.04 | aws/codebuild/standard:4.0 | ubuntu/standard/4.0 | March 31, 2023 | 
| Amazon Linux 2 | aws/codebuild/amazonlinux2-aarch64-standard:1.0 | al2/aarch64/standard/1.0 | March 31, 2023 | 
| Ubuntu 18.04 | aws/codebuild/standard:3.0 | ubuntu/standard/3.0 | June 30, 2022 | 
| Amazon Linux 2 | aws/codebuild/amazonlinux2-x86\$164-standard:2.0 | al2/standard/2.0 | June 30, 2022 | 

**Topics**
+ [Obtain the list of current Docker images](build-env-ref-available-get.md)
+ [EC2 compute images](ec2-compute-images.md)
+ [Lambda compute images](lambda-compute-images.md)
+ [Deprecated CodeBuild images](deprecated-images.md)
+ [Available runtimes](available-runtimes.md)
+ [Runtime versions](runtime-versions.md)

# Available runtimes
<a name="available-runtimes"></a>

You can specify one or more runtimes in the `runtime-versions` section of your buildspec file. If your runtime is dependent upon another runtime, you can also specify its dependent runtime in the buildspec file. If you do not specify any runtimes in the buildspec file, CodeBuild chooses the default runtimes that are available in the image you use. If you specify one or more runtimes, CodeBuild uses only those runtimes. If a dependent runtime is not specified, CodeBuild attempts to choose the dependent runtime for you. 

**Note**  
If a runtime version is not specified, CodeBuild uses the default version. The default version can change when a previously default version reaches end of life (EOL). To avoid unexpected changes to the build environment, we recommend specifying a runtime version in the buildspec file.

 For more information, see [Specify runtime versions in the buildspec file](build-spec-ref.md#runtime-versions-buildspec-file).

[Specify runtime versions in the buildspec file](build-spec-ref.md#runtime-versions-buildspec-file).

.

**Topics**
+ [Linux image runtimes](#linux-runtimes)
+ [macOS image runtimes](#macOS-runtimes)
+ [Windows image runtimes](#windows-runtimes)

## Linux image runtimes
<a name="linux-runtimes"></a>

The following table contains the available runtimes and the standard Linux images that support them. 


**Ubuntu and Amazon Linux platform runtimes**  
[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/codebuild/latest/userguide/available-runtimes.html)

## macOS image runtimes
<a name="macOS-runtimes"></a>

**Important**  
The CodeBuild curated images for Mac builds contain macOS and Xcode pre-installed. By using the Xcode software, you acknowledge, understand, and consent to the [Xcode and Apple SDKs Agreement](https://www.apple.com/legal/sla/docs/xcode.pdf). If you do not accept the terms and conditions of the agreement, do not use the Xcode software. Instead, provide your own Amazon Machine Images (AMI). For more information, see [How do I configure a reserved capacity macOS fleet?](fleets.md#fleets.configure-macos)

The following table contains the available runtimes supported by macOS.


**macOS platform runtimes**  
[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/codebuild/latest/userguide/available-runtimes.html)

## Windows image runtimes
<a name="windows-runtimes"></a>

The base image of the Windows Server Core 2019 contains the following runtimes.


**Windows platform runtimes**  

| Runtime name | Windows Server Core 2019 standard:1.0 versions | Windows Server Core 2019 standard:2.0 versions | Windows Server Core 2019 standard:3.0 versions | 
| --- | --- | --- | --- | 
| dotnet | 3.15.0 | 3.16.07.0 | 8.0 | 
| dotnet sdk | 3.15.0 | 3.16.07.0 | 8.0 | 
| golang | 1.14 | 1.18 | 1.211.221.23 | 
| gradle | 6.7 | 7.6 | 8.12 | 
| java | Corretto11 | Corretto11Corretto17 | Corretto8Corretto11Corretto17Corretto21 | 
| maven | 3.6 | 3.8 | 3.9 | 
| nodejs | 14.15 | 16.19 | 20.1822.13 | 
| php | 7.4 | 8.1 | 8.38.4 | 
| powershell | 7.1 | 7.2 | 7.4 | 
| python | 3.8 | 3.10 | 3.103.113.123.13 | 
| ruby | 2.7 | 3.1 | 3.23.33.4 | 

# Runtime versions
<a name="runtime-versions"></a>

When you specify a runtime in the [`runtime-versions`](build-spec-ref.md#build-spec.phases.install.runtime-versions) section of your buildspec file, you can specify a specific version, a specific major version and the latest minor version, or the latest version. The following table lists the available runtimes and how to specify them. Not all runtime versions are available on all images. Runtime version selection is also not supported for the custom images. For more information, see [Available runtimes](available-runtimes.md). If you'd like to install and use a custom runtime version instead of the pre-installed runtime versions, see [Custom runtime versions](#custom-runtime).


**Ubuntu and Amazon Linux 2 platform runtime versions**  
[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/codebuild/latest/userguide/runtime-versions.html)

You can use a build specification to install other components (for example, the AWS CLI, Apache Maven, Apache Ant, Mocha, RSpec, or similar) during the `install` build phase. For more information, see [Buildspec example](build-spec-ref.md#build-spec-ref-example).

## Custom runtime versions
<a name="custom-runtime"></a>

Instead of using the pre-installed runtime versions in CodeBuild-managed images, you can install and use custom versions of your choice. The following table lists the available custom runtimes and how to specify them.

**Note**  
Custom runtime version selection is only supported for Ubuntu and Amazon Linux images.


**Custom runtime versions**  

| Runtime name  | Syntax | Example | 
| --- | --- | --- | 
| dotnet |  `<major>.<minor>.<patch>`  |  `5.0.408`  | 
| golang |  `<major>.<minor>` `<major>.<minor>.<patch>`  |  `1.19` `1.19.1`  | 
| java |  `corretto<major>`  |  `corretto15`  | 
| nodejs |  `<major>` `<major>.<minor>` `<major>.<minor>.<patch>`  |  `14` `14.21` `14.21.3`  | 
| php |  `<major>.<minor>.<patch>`  |  `8.0.30`  | 
| python |  `<major>` `<major>.<minor>` `<major>.<minor>.<patch>`  |  `3` `3.7` `3.7.16`  | 
| ruby |  `<major>.<minor>.<patch>`  |  `3.0.6`  | 

### Custom runtime buildspec example
<a name="custom-runtime-buildspec"></a>

Here is an example of a buildspec that specifies custom runtime versions.

```
version: 0.2
phases:
  install:
    runtime-versions:
      java: corretto15
      php: 8.0.30
      ruby: 3.0.6
      golang: 1.19
      python: 3.7
      nodejs: 14
      dotnet: 5.0.408
```

# Build environment compute modes and types
<a name="build-env-ref-compute-types"></a>

In CodeBuild, you can specify the compute and runtime environment image that CodeBuild uses to run your builds. *Compute* refers to the computing engine (the CPU, memory, and operating system) that is managed and maintained by CodeBuild. A *runtime environment image* is a container image that runs on top of your chosen compute platform, and includes extra tools that your build might need, such as the AWS CLI.

**Topics**
+ [About compute](#compute.types)
+ [About reserved capacity environment types](#environment-reserved-capacity.types)
+ [About on-demand environment types](#environment.types)

## About compute
<a name="compute.types"></a>

CodeBuild offers EC2 and AWS Lambda compute modes. EC2 offers optimized flexibility during your build and AWS Lambda offers optimized start-up speeds. AWS Lambda supports faster builds due to a lower start-up latency. AWS Lambda also automatically scales, so builds aren't waiting in queue to run. For more information, see [Run builds on AWS Lambda compute](lambda.md).

With the EC2 compute mode, you can run your builds with on-demand or reserved capacity fleets. For on-demand fleets, you can select pre-defined compute types such as`BUILD_GENERAL1_SMALL` or `BUILD_GENERAL1_LARGE`. For more information, see [About on-demand environment types](#environment.types). For reserved capacity fleets, you can select your compute configurations including vCPU, memory and disk space. After specifying the configurations, CodeBuild will choose a supported compute type that matches your requirements. For more information, see [About reserved capacity environment types](#environment-reserved-capacity.types).

## About reserved capacity environment types
<a name="environment-reserved-capacity.types"></a>

AWS CodeBuild provides Linux x86, Arm, GPU, Windows and macOS environment types for reserved capacity fleets. The following table shows the available machine type, memory, vCPUs, and disk space sorted by region:

------
#### [ US East (N. Virginia) ]


| Environment type | vCPUs | Memory | Disk space | Machine type | Compute instance type | 
| --- | --- | --- | --- | --- | --- | 
| ARM | 2 | 4 GiB | 64 GB | GENERAL | reserved.arm.2cpu.4gib | 
| ARM | 4 | 8 GiB | 128 GB | GENERAL | reserved.arm.4cpu.8gib | 
| ARM | 8 | 16 GiB | 128 GB | GENERAL | reserved.arm.8cpu.16gib | 
| ARM | 16 | 32 GiB | 256 GB | GENERAL | reserved.arm.16cpu.32gib | 
| ARM | 32 | 64 GiB | 256 GB | GENERAL | reserved.arm.32cpu.64gib | 
| ARM | 48 | 96 GiB | 512 GB | GENERAL | reserved.arm.48cpu.96gib | 
| ARM | 64 | 128 GiB | 824 GB | GENERAL | reserved.arm.64cpu.128gib | 
| ARM EC2 | 2 | 4 GiB | 64 GB | GENERAL | reserved.arm.2cpu.4gib | 
| ARM EC2 | 4 | 8 GiB | 128 GB | GENERAL | reserved.arm.4cpu.8gib | 
| ARM EC2 | 8 | 16 GiB | 128 GB | GENERAL | reserved.arm.8cpu.16gib | 
| Linux | 2 | 4 GiB | 64 GB | GENERAL | reserved.x86-64.2cpu.4gib | 
| Linux | 4 | 8 GiB | 128 GB | GENERAL | reserved.x86-64.4cpu.8gib | 
| Linux | 8 | 16 GiB | 128 GB | GENERAL | reserved.x86-64.8cpu.16gib | 
| Linux | 16 | 32 GiB | 256 GB | GENERAL | reserved.x86-64.16cpu.32gib | 
| Linux | 36 | 72 GiB | 256 GB | GENERAL | reserved.x86-64.36cpu.72gib | 
| Linux | 48 | 96 GiB | 512 GB | GENERAL | reserved.x86-64.48cpu.96gib | 
| Linux | 72 | 144 GiB | 824 GB | GENERAL | reserved.x86-64.72cpu.144gib | 
| Linux | 96 | 192 GiB | 824 GB | GENERAL | reserved.x86-64.96cpu.192gib | 
| Linux | 48 | 96 GiB | 824 GB (SSD) | NVME | reserved.x86-64.48cpu.96gib.nvme | 
| Linux | 72 | 144 GiB | 824 GB (SSD) | NVME | reserved.x86-64.72cpu.144gib.nvme | 
| Linux EC2 | 2 | 4 GiB | 64 GB | GENERAL | reserved.x86-64.2cpu.4gib | 
| Linux EC2 | 4 | 8 GiB | 128 GB | GENERAL | reserved.x86-64.4cpu.8gib | 
| Linux EC2 | 8 | 16 GiB | 128 GB | GENERAL | reserved.x86-64.8cpu.16gib | 
| Linux GPU | 4 | 16 GiB | 235 GB (SSD) | NVME | reserved.gpu.4cpu.16gib.nvme | 
| Linux GPU | 8 | 32 GiB | 435 GB (SSD) | NVME | reserved.gpu.8cpu.32gib.nvme | 
| Linux GPU | 16 | 64 GiB | 585 GB (SSD) | NVME | reserved.gpu.16cpu.64gib.nvme | 
| Linux GPU | 32 | 128 GiB | 885 GB (SSD) | NVME | reserved.gpu.32cpu.128gib.nvme | 
| Linux GPU | 48 | 192 GiB | 3785 GB (SSD) | NVME | reserved.gpu.48cpu.192gib.nvme | 
| Linux GPU | 64 | 256 GiB | 1885 GB (SSD) | NVME | reserved.gpu.64cpu.256gib.nvme | 
| Linux GPU | 96 | 384 GiB | 3785 GB (SSD) | NVME | reserved.gpu.96cpu.384gib.nvme | 
| macOS | 8 | 24 GiB | 128 GB | GENERAL | reserved.arm.m2.8cpu.24gib | 
| macOS | 12 | 32 GiB | 256 GB | GENERAL | reserved.arm.m2.12cpu.32gib | 
| Windows | 2 | 4 GiB | 64 GB | GENERAL | reserved.x86-64.2cpu.4gib | 
| Windows | 4 | 8 GiB | 128 GB | GENERAL | reserved.x86-64.4cpu.8gib | 
| Windows | 8 | 16 GiB | 128 GB | GENERAL | reserved.x86-64.8cpu.16gib | 
| Windows | 16 | 32 GiB | 256 GB | GENERAL | reserved.x86-64.16cpu.32gib | 
| Windows | 36 | 72 GiB | 256 GB | GENERAL | reserved.x86-64.36cpu.72gib | 
| Windows | 48 | 96 GiB | 512 GB | GENERAL | reserved.x86-64.48cpu.96gib | 
| Windows | 72 | 144 GiB | 824 GB | GENERAL | reserved.x86-64.72cpu.144gib | 
| Windows | 96 | 192 GiB | 824 GB | GENERAL | reserved.x86-64.96cpu.192gib | 
| Windows EC2 | 4 | 8 GiB | 128 GB | GENERAL | reserved.x86-64.4cpu.8gib | 
| Windows EC2 | 8 | 16 GiB | 128 GB | GENERAL | reserved.x86-64.8cpu.16gib | 

For more information on the pricing identifier, see [https://aws.amazon.com/codebuild/pricing/](https://aws.amazon.com/codebuild/pricing/).

------
#### [ US East (Ohio) ]


| Environment type | vCPUs | Memory | Disk space | Machine type | Compute instance type | 
| --- | --- | --- | --- | --- | --- | 
| ARM | 2 | 4 GiB | 64 GB | GENERAL | reserved.arm.2cpu.4gib | 
| ARM | 4 | 8 GiB | 128 GB | GENERAL | reserved.arm.4cpu.8gib | 
| ARM | 8 | 16 GiB | 128 GB | GENERAL | reserved.arm.8cpu.16gib | 
| ARM | 16 | 32 GiB | 256 GB | GENERAL | reserved.arm.16cpu.32gib | 
| ARM | 32 | 64 GiB | 256 GB | GENERAL | reserved.arm.32cpu.64gib | 
| ARM | 48 | 96 GiB | 512 GB | GENERAL | reserved.arm.48cpu.96gib | 
| ARM | 64 | 128 GiB | 824 GB | GENERAL | reserved.arm.64cpu.128gib | 
| ARM EC2 | 2 | 4 GiB | 64 GB | GENERAL | reserved.arm.2cpu.4gib | 
| ARM EC2 | 4 | 8 GiB | 128 GB | GENERAL | reserved.arm.4cpu.8gib | 
| ARM EC2 | 8 | 16 GiB | 128 GB | GENERAL | reserved.arm.8cpu.16gib | 
| Linux | 2 | 4 GiB | 64 GB | GENERAL | reserved.x86-64.2cpu.4gib | 
| Linux | 4 | 8 GiB | 128 GB | GENERAL | reserved.x86-64.4cpu.8gib | 
| Linux | 8 | 16 GiB | 128 GB | GENERAL | reserved.x86-64.8cpu.16gib | 
| Linux | 16 | 32 GiB | 256 GB | GENERAL | reserved.x86-64.16cpu.32gib | 
| Linux | 36 | 72 GiB | 256 GB | GENERAL | reserved.x86-64.36cpu.72gib | 
| Linux | 48 | 96 GiB | 512 GB | GENERAL | reserved.x86-64.48cpu.96gib | 
| Linux | 48 | 96 GiB | 824 GB (SSD) | NVME | reserved.x86-64.48cpu.96gib.nvme | 
| Linux | 72 | 144 GiB | 824 GB (SSD) | NVME | reserved.x86-64.72cpu.144gib.nvme | 
| Linux EC2 | 2 | 4 GiB | 64 GB | GENERAL | reserved.x86-64.2cpu.4gib | 
| Linux EC2 | 4 | 8 GiB | 128 GB | GENERAL | reserved.x86-64.4cpu.8gib | 
| Linux EC2 | 8 | 16 GiB | 128 GB | GENERAL | reserved.x86-64.8cpu.16gib | 
| Linux GPU | 4 | 16 GiB | 235 GB (SSD) | NVME | reserved.gpu.4cpu.16gib.nvme | 
| Linux GPU | 8 | 32 GiB | 435 GB (SSD) | NVME | reserved.gpu.8cpu.32gib.nvme | 
| Linux GPU | 16 | 64 GiB | 585 GB (SSD) | NVME | reserved.gpu.16cpu.64gib.nvme | 
| Linux GPU | 32 | 128 GiB | 885 GB (SSD) | NVME | reserved.gpu.32cpu.128gib.nvme | 
| Linux GPU | 48 | 192 GiB | 3785 GB (SSD) | NVME | reserved.gpu.48cpu.192gib.nvme | 
| macOS | 8 | 24 GiB | 128 GB | GENERAL | reserved.arm.m2.8cpu.24gib | 
| macOS | 12 | 32 GiB | 256 GB | GENERAL | reserved.arm.m2.12cpu.32gib | 
| Windows | 2 | 4 GiB | 64 GB | GENERAL | reserved.x86-64.2cpu.4gib | 
| Windows | 4 | 8 GiB | 128 GB | GENERAL | reserved.x86-64.4cpu.8gib | 
| Windows | 8 | 16 GiB | 128 GB | GENERAL | reserved.x86-64.8cpu.16gib | 
| Windows | 16 | 32 GiB | 256 GB | GENERAL | reserved.x86-64.16cpu.32gib | 
| Windows | 36 | 72 GiB | 256 GB | GENERAL | reserved.x86-64.36cpu.72gib | 
| Windows | 48 | 96 GiB | 512 GB | GENERAL | reserved.x86-64.48cpu.96gib | 
| Windows EC2 | 4 | 8 GiB | 128 GB | GENERAL | reserved.x86-64.4cpu.8gib | 
| Windows EC2 | 8 | 16 GiB | 128 GB | GENERAL | reserved.x86-64.8cpu.16gib | 

For more information on the pricing identifier, see [https://aws.amazon.com/codebuild/pricing/](https://aws.amazon.com/codebuild/pricing/).

------
#### [ US West (Oregon) ]


| Environment type | vCPUs | Memory | Disk space | Machine type | Compute instance type | 
| --- | --- | --- | --- | --- | --- | 
| ARM | 2 | 4 GiB | 64 GB | GENERAL | reserved.arm.2cpu.4gib | 
| ARM | 4 | 8 GiB | 128 GB | GENERAL | reserved.arm.4cpu.8gib | 
| ARM | 8 | 16 GiB | 128 GB | GENERAL | reserved.arm.8cpu.16gib | 
| ARM | 16 | 32 GiB | 256 GB | GENERAL | reserved.arm.16cpu.32gib | 
| ARM | 32 | 64 GiB | 256 GB | GENERAL | reserved.arm.32cpu.64gib | 
| ARM | 48 | 96 GiB | 512 GB | GENERAL | reserved.arm.48cpu.96gib | 
| ARM | 64 | 128 GiB | 824 GB | GENERAL | reserved.arm.64cpu.128gib | 
| ARM EC2 | 2 | 4 GiB | 64 GB | GENERAL | reserved.arm.2cpu.4gib | 
| ARM EC2 | 4 | 8 GiB | 128 GB | GENERAL | reserved.arm.4cpu.8gib | 
| ARM EC2 | 8 | 16 GiB | 128 GB | GENERAL | reserved.arm.8cpu.16gib | 
| Linux | 2 | 4 GiB | 64 GB | GENERAL | reserved.x86-64.2cpu.4gib | 
| Linux | 4 | 8 GiB | 128 GB | GENERAL | reserved.x86-64.4cpu.8gib | 
| Linux | 8 | 16 GiB | 128 GB | GENERAL | reserved.x86-64.8cpu.16gib | 
| Linux | 16 | 32 GiB | 256 GB | GENERAL | reserved.x86-64.16cpu.32gib | 
| Linux | 36 | 72 GiB | 256 GB | GENERAL | reserved.x86-64.36cpu.72gib | 
| Linux | 48 | 96 GiB | 512 GB | GENERAL | reserved.x86-64.48cpu.96gib | 
| Linux | 72 | 144 GiB | 824 GB | GENERAL | reserved.x86-64.72cpu.144gib | 
| Linux | 96 | 192 GiB | 824 GB | GENERAL | reserved.x86-64.96cpu.192gib | 
| Linux | 48 | 96 GiB | 824 GB (SSD) | NVME | reserved.x86-64.48cpu.96gib.nvme | 
| Linux | 72 | 144 GiB | 824 GB (SSD) | NVME | reserved.x86-64.72cpu.144gib.nvme | 
| Linux EC2 | 2 | 4 GiB | 64 GB | GENERAL | reserved.x86-64.2cpu.4gib | 
| Linux EC2 | 4 | 8 GiB | 128 GB | GENERAL | reserved.x86-64.4cpu.8gib | 
| Linux EC2 | 8 | 16 GiB | 128 GB | GENERAL | reserved.x86-64.8cpu.16gib | 
| Linux GPU | 4 | 16 GiB | 235 GB (SSD) | NVME | reserved.gpu.4cpu.16gib.nvme | 
| Linux GPU | 8 | 32 GiB | 435 GB (SSD) | NVME | reserved.gpu.8cpu.32gib.nvme | 
| Linux GPU | 16 | 64 GiB | 585 GB (SSD) | NVME | reserved.gpu.16cpu.64gib.nvme | 
| Linux GPU | 32 | 128 GiB | 885 GB (SSD) | NVME | reserved.gpu.32cpu.128gib.nvme | 
| Linux GPU | 48 | 192 GiB | 3785 GB (SSD) | NVME | reserved.gpu.48cpu.192gib.nvme | 
| Linux GPU | 64 | 256 GiB | 1885 GB (SSD) | NVME | reserved.gpu.64cpu.256gib.nvme | 
| macOS | 8 | 24 GiB | 128 GB | GENERAL | reserved.arm.m2.8cpu.24gib | 
| macOS | 12 | 32 GiB | 256 GB | GENERAL | reserved.arm.m2.12cpu.32gib | 
| Windows | 2 | 4 GiB | 64 GB | GENERAL | reserved.x86-64.2cpu.4gib | 
| Windows | 4 | 8 GiB | 128 GB | GENERAL | reserved.x86-64.4cpu.8gib | 
| Windows | 8 | 16 GiB | 128 GB | GENERAL | reserved.x86-64.8cpu.16gib | 
| Windows | 16 | 32 GiB | 256 GB | GENERAL | reserved.x86-64.16cpu.32gib | 
| Windows | 36 | 72 GiB | 256 GB | GENERAL | reserved.x86-64.36cpu.72gib | 
| Windows | 48 | 96 GiB | 512 GB | GENERAL | reserved.x86-64.48cpu.96gib | 
| Windows | 72 | 144 GiB | 824 GB | GENERAL | reserved.x86-64.72cpu.144gib | 
| Windows | 96 | 192 GiB | 824 GB | GENERAL | reserved.x86-64.96cpu.192gib | 
| Windows EC2 | 4 | 8 GiB | 128 GB | GENERAL | reserved.x86-64.4cpu.8gib | 
| Windows EC2 | 8 | 16 GiB | 128 GB | GENERAL | reserved.x86-64.8cpu.16gib | 

For more information on the pricing identifier, see [https://aws.amazon.com/codebuild/pricing/](https://aws.amazon.com/codebuild/pricing/).

------
#### [ Asia Pacific (Tokyo) ]


| Environment type | vCPUs | Memory | Disk space | Machine type | Compute instance type | 
| --- | --- | --- | --- | --- | --- | 
| ARM | 2 | 4 GiB | 64 GB | GENERAL | reserved.arm.2cpu.4gib | 
| ARM | 4 | 8 GiB | 128 GB | GENERAL | reserved.arm.4cpu.8gib | 
| ARM | 8 | 16 GiB | 128 GB | GENERAL | reserved.arm.8cpu.16gib | 
| ARM | 16 | 32 GiB | 256 GB | GENERAL | reserved.arm.16cpu.32gib | 
| ARM | 32 | 64 GiB | 256 GB | GENERAL | reserved.arm.32cpu.64gib | 
| ARM | 48 | 96 GiB | 512 GB | GENERAL | reserved.arm.48cpu.96gib | 
| ARM | 64 | 128 GiB | 824 GB | GENERAL | reserved.arm.64cpu.128gib | 
| ARM EC2 | 2 | 4 GiB | 64 GB | GENERAL | reserved.arm.2cpu.4gib | 
| ARM EC2 | 4 | 8 GiB | 128 GB | GENERAL | reserved.arm.4cpu.8gib | 
| ARM EC2 | 8 | 16 GiB | 128 GB | GENERAL | reserved.arm.8cpu.16gib | 
| Linux | 2 | 4 GiB | 64 GB | GENERAL | reserved.x86-64.2cpu.4gib | 
| Linux | 4 | 8 GiB | 128 GB | GENERAL | reserved.x86-64.4cpu.8gib | 
| Linux | 8 | 16 GiB | 128 GB | GENERAL | reserved.x86-64.8cpu.16gib | 
| Linux | 16 | 32 GiB | 256 GB | GENERAL | reserved.x86-64.16cpu.32gib | 
| Linux | 36 | 72 GiB | 256 GB | GENERAL | reserved.x86-64.36cpu.72gib | 
| Linux | 48 | 96 GiB | 512 GB | GENERAL | reserved.x86-64.48cpu.96gib | 
| Linux | 72 | 144 GiB | 824 GB | GENERAL | reserved.x86-64.72cpu.144gib | 
| Linux | 96 | 192 GiB | 824 GB | GENERAL | reserved.x86-64.96cpu.192gib | 
| Linux | 72 | 144 GiB | 824 GB (SSD) | NVME | reserved.x86-64.72cpu.144gib.nvme | 
| Linux EC2 | 2 | 4 GiB | 64 GB | GENERAL | reserved.x86-64.2cpu.4gib | 
| Linux EC2 | 4 | 8 GiB | 128 GB | GENERAL | reserved.x86-64.4cpu.8gib | 
| Linux EC2 | 8 | 16 GiB | 128 GB | GENERAL | reserved.x86-64.8cpu.16gib | 
| Linux GPU | 4 | 16 GiB | 235 GB (SSD) | NVME | reserved.gpu.4cpu.16gib.nvme | 
| Linux GPU | 8 | 32 GiB | 435 GB (SSD) | NVME | reserved.gpu.8cpu.32gib.nvme | 
| Linux GPU | 48 | 192 GiB | 3785 GB (SSD) | NVME | reserved.gpu.48cpu.192gib.nvme | 
| Windows | 2 | 4 GiB | 64 GB | GENERAL | reserved.x86-64.2cpu.4gib | 
| Windows | 4 | 8 GiB | 128 GB | GENERAL | reserved.x86-64.4cpu.8gib | 
| Windows | 8 | 16 GiB | 128 GB | GENERAL | reserved.x86-64.8cpu.16gib | 
| Windows | 16 | 32 GiB | 256 GB | GENERAL | reserved.x86-64.16cpu.32gib | 
| Windows | 36 | 72 GiB | 256 GB | GENERAL | reserved.x86-64.36cpu.72gib | 
| Windows | 48 | 96 GiB | 512 GB | GENERAL | reserved.x86-64.48cpu.96gib | 
| Windows | 72 | 144 GiB | 824 GB | GENERAL | reserved.x86-64.72cpu.144gib | 
| Windows | 96 | 192 GiB | 824 GB | GENERAL | reserved.x86-64.96cpu.192gib | 
| Windows EC2 | 4 | 8 GiB | 128 GB | GENERAL | reserved.x86-64.4cpu.8gib | 
| Windows EC2 | 8 | 16 GiB | 128 GB | GENERAL | reserved.x86-64.8cpu.16gib | 

For more information on the pricing identifier, see [https://aws.amazon.com/codebuild/pricing/](https://aws.amazon.com/codebuild/pricing/).

------
#### [ Asia Pacific (Mumbai) ]


| Environment type | vCPUs | Memory | Disk space | Machine type | Compute instance type | 
| --- | --- | --- | --- | --- | --- | 
| ARM | 2 | 4 GiB | 64 GB | GENERAL | reserved.arm.2cpu.4gib | 
| ARM | 4 | 8 GiB | 128 GB | GENERAL | reserved.arm.4cpu.8gib | 
| ARM | 8 | 16 GiB | 128 GB | GENERAL | reserved.arm.8cpu.16gib | 
| ARM | 16 | 32 GiB | 256 GB | GENERAL | reserved.arm.16cpu.32gib | 
| ARM | 32 | 64 GiB | 256 GB | GENERAL | reserved.arm.32cpu.64gib | 
| ARM | 48 | 96 GiB | 512 GB | GENERAL | reserved.arm.48cpu.96gib | 
| ARM | 64 | 128 GiB | 824 GB | GENERAL | reserved.arm.64cpu.128gib | 
| ARM EC2 | 2 | 4 GiB | 64 GB | GENERAL | reserved.arm.2cpu.4gib | 
| ARM EC2 | 4 | 8 GiB | 128 GB | GENERAL | reserved.arm.4cpu.8gib | 
| ARM EC2 | 8 | 16 GiB | 128 GB | GENERAL | reserved.arm.8cpu.16gib | 
| Linux | 2 | 4 GiB | 64 GB | GENERAL | reserved.x86-64.2cpu.4gib | 
| Linux | 4 | 8 GiB | 128 GB | GENERAL | reserved.x86-64.4cpu.8gib | 
| Linux | 8 | 16 GiB | 128 GB | GENERAL | reserved.x86-64.8cpu.16gib | 
| Linux | 16 | 32 GiB | 256 GB | GENERAL | reserved.x86-64.16cpu.32gib | 
| Linux | 36 | 72 GiB | 256 GB | GENERAL | reserved.x86-64.36cpu.72gib | 
| Linux | 48 | 96 GiB | 512 GB | GENERAL | reserved.x86-64.48cpu.96gib | 
| Linux | 72 | 144 GiB | 824 GB | GENERAL | reserved.x86-64.72cpu.144gib | 
| Linux | 96 | 192 GiB | 824 GB | GENERAL | reserved.x86-64.96cpu.192gib | 
| Linux | 72 | 144 GiB | 824 GB (SSD) | NVME | reserved.x86-64.72cpu.144gib.nvme | 
| Linux EC2 | 2 | 4 GiB | 64 GB | GENERAL | reserved.x86-64.2cpu.4gib | 
| Linux EC2 | 4 | 8 GiB | 128 GB | GENERAL | reserved.x86-64.4cpu.8gib | 
| Linux EC2 | 8 | 16 GiB | 128 GB | GENERAL | reserved.x86-64.8cpu.16gib | 
| Linux GPU | 4 | 16 GiB | 235 GB (SSD) | NVME | reserved.gpu.4cpu.16gib.nvme | 
| Linux GPU | 8 | 32 GiB | 435 GB (SSD) | NVME | reserved.gpu.8cpu.32gib.nvme | 
| Linux GPU | 16 | 64 GiB | 585 GB (SSD) | NVME | reserved.gpu.16cpu.64gib.nvme | 
| Windows | 2 | 4 GiB | 64 GB | GENERAL | reserved.x86-64.2cpu.4gib | 
| Windows | 4 | 8 GiB | 128 GB | GENERAL | reserved.x86-64.4cpu.8gib | 
| Windows | 8 | 16 GiB | 128 GB | GENERAL | reserved.x86-64.8cpu.16gib | 
| Windows | 16 | 32 GiB | 256 GB | GENERAL | reserved.x86-64.16cpu.32gib | 
| Windows | 36 | 72 GiB | 256 GB | GENERAL | reserved.x86-64.36cpu.72gib | 
| Windows | 48 | 96 GiB | 512 GB | GENERAL | reserved.x86-64.48cpu.96gib | 
| Windows | 72 | 144 GiB | 824 GB | GENERAL | reserved.x86-64.72cpu.144gib | 
| Windows | 96 | 192 GiB | 824 GB | GENERAL | reserved.x86-64.96cpu.192gib | 
| Windows EC2 | 4 | 8 GiB | 128 GB | GENERAL | reserved.x86-64.4cpu.8gib | 
| Windows EC2 | 8 | 16 GiB | 128 GB | GENERAL | reserved.x86-64.8cpu.16gib | 

For more information on the pricing identifier, see [https://aws.amazon.com/codebuild/pricing/](https://aws.amazon.com/codebuild/pricing/).

------
#### [ Asia Pacific (Singapore) ]


| Environment type | vCPUs | Memory | Disk space | Machine type | Compute instance type | 
| --- | --- | --- | --- | --- | --- | 
| ARM | 2 | 4 GiB | 64 GB | GENERAL | reserved.arm.2cpu.4gib | 
| ARM | 4 | 8 GiB | 128 GB | GENERAL | reserved.arm.4cpu.8gib | 
| ARM | 8 | 16 GiB | 128 GB | GENERAL | reserved.arm.8cpu.16gib | 
| ARM | 16 | 32 GiB | 256 GB | GENERAL | reserved.arm.16cpu.32gib | 
| ARM | 32 | 64 GiB | 256 GB | GENERAL | reserved.arm.32cpu.64gib | 
| ARM | 48 | 96 GiB | 512 GB | GENERAL | reserved.arm.48cpu.96gib | 
| ARM | 64 | 128 GiB | 824 GB | GENERAL | reserved.arm.64cpu.128gib | 
| ARM EC2 | 2 | 4 GiB | 64 GB | GENERAL | reserved.arm.2cpu.4gib | 
| ARM EC2 | 4 | 8 GiB | 128 GB | GENERAL | reserved.arm.4cpu.8gib | 
| ARM EC2 | 8 | 16 GiB | 128 GB | GENERAL | reserved.arm.8cpu.16gib | 
| Linux | 2 | 4 GiB | 64 GB | GENERAL | reserved.x86-64.2cpu.4gib | 
| Linux | 4 | 8 GiB | 128 GB | GENERAL | reserved.x86-64.4cpu.8gib | 
| Linux | 8 | 16 GiB | 128 GB | GENERAL | reserved.x86-64.8cpu.16gib | 
| Linux | 16 | 32 GiB | 256 GB | GENERAL | reserved.x86-64.16cpu.32gib | 
| Linux | 36 | 72 GiB | 256 GB | GENERAL | reserved.x86-64.36cpu.72gib | 
| Linux | 48 | 96 GiB | 512 GB | GENERAL | reserved.x86-64.48cpu.96gib | 
| Linux | 72 | 144 GiB | 824 GB | GENERAL | reserved.x86-64.72cpu.144gib | 
| Linux | 96 | 192 GiB | 824 GB | GENERAL | reserved.x86-64.96cpu.192gib | 
| Linux | 48 | 96 GiB | 824 GB (SSD) | NVME | reserved.x86-64.48cpu.96gib.nvme | 
| Linux | 72 | 144 GiB | 824 GB (SSD) | NVME | reserved.x86-64.72cpu.144gib.nvme | 
| Linux EC2 | 2 | 4 GiB | 64 GB | GENERAL | reserved.x86-64.2cpu.4gib | 
| Linux EC2 | 4 | 8 GiB | 128 GB | GENERAL | reserved.x86-64.4cpu.8gib | 
| Linux EC2 | 8 | 16 GiB | 128 GB | GENERAL | reserved.x86-64.8cpu.16gib | 
| Windows | 2 | 4 GiB | 64 GB | GENERAL | reserved.x86-64.2cpu.4gib | 
| Windows | 4 | 8 GiB | 128 GB | GENERAL | reserved.x86-64.4cpu.8gib | 
| Windows | 8 | 16 GiB | 128 GB | GENERAL | reserved.x86-64.8cpu.16gib | 
| Windows | 16 | 32 GiB | 256 GB | GENERAL | reserved.x86-64.16cpu.32gib | 
| Windows | 36 | 72 GiB | 256 GB | GENERAL | reserved.x86-64.36cpu.72gib | 
| Windows | 48 | 96 GiB | 512 GB | GENERAL | reserved.x86-64.48cpu.96gib | 
| Windows | 72 | 144 GiB | 824 GB | GENERAL | reserved.x86-64.72cpu.144gib | 
| Windows | 96 | 192 GiB | 824 GB | GENERAL | reserved.x86-64.96cpu.192gib | 
| Windows EC2 | 4 | 8 GiB | 128 GB | GENERAL | reserved.x86-64.4cpu.8gib | 
| Windows EC2 | 8 | 16 GiB | 128 GB | GENERAL | reserved.x86-64.8cpu.16gib | 

For more information on the pricing identifier, see [https://aws.amazon.com/codebuild/pricing/](https://aws.amazon.com/codebuild/pricing/).

------
#### [ Asia Pacific (Sydney) ]


| Environment type | vCPUs | Memory | Disk space | Machine type | Compute instance type | 
| --- | --- | --- | --- | --- | --- | 
| ARM | 2 | 4 GiB | 64 GB | GENERAL | reserved.arm.2cpu.4gib | 
| ARM | 4 | 8 GiB | 128 GB | GENERAL | reserved.arm.4cpu.8gib | 
| ARM | 8 | 16 GiB | 128 GB | GENERAL | reserved.arm.8cpu.16gib | 
| ARM | 16 | 32 GiB | 256 GB | GENERAL | reserved.arm.16cpu.32gib | 
| ARM | 32 | 64 GiB | 256 GB | GENERAL | reserved.arm.32cpu.64gib | 
| ARM | 48 | 96 GiB | 512 GB | GENERAL | reserved.arm.48cpu.96gib | 
| ARM | 64 | 128 GiB | 824 GB | GENERAL | reserved.arm.64cpu.128gib | 
| ARM EC2 | 2 | 4 GiB | 64 GB | GENERAL | reserved.arm.2cpu.4gib | 
| ARM EC2 | 4 | 8 GiB | 128 GB | GENERAL | reserved.arm.4cpu.8gib | 
| ARM EC2 | 8 | 16 GiB | 128 GB | GENERAL | reserved.arm.8cpu.16gib | 
| Linux | 2 | 4 GiB | 64 GB | GENERAL | reserved.x86-64.2cpu.4gib | 
| Linux | 4 | 8 GiB | 128 GB | GENERAL | reserved.x86-64.4cpu.8gib | 
| Linux | 8 | 16 GiB | 128 GB | GENERAL | reserved.x86-64.8cpu.16gib | 
| Linux | 16 | 32 GiB | 256 GB | GENERAL | reserved.x86-64.16cpu.32gib | 
| Linux | 36 | 72 GiB | 256 GB | GENERAL | reserved.x86-64.36cpu.72gib | 
| Linux | 48 | 96 GiB | 512 GB | GENERAL | reserved.x86-64.48cpu.96gib | 
| Linux | 72 | 144 GiB | 824 GB | GENERAL | reserved.x86-64.72cpu.144gib | 
| Linux | 96 | 192 GiB | 824 GB | GENERAL | reserved.x86-64.96cpu.192gib | 
| Linux | 72 | 144 GiB | 824 GB (SSD) | NVME | reserved.x86-64.72cpu.144gib.nvme | 
| Linux EC2 | 2 | 4 GiB | 64 GB | GENERAL | reserved.x86-64.2cpu.4gib | 
| Linux EC2 | 4 | 8 GiB | 128 GB | GENERAL | reserved.x86-64.4cpu.8gib | 
| Linux EC2 | 8 | 16 GiB | 128 GB | GENERAL | reserved.x86-64.8cpu.16gib | 
| Linux GPU | 4 | 16 GiB | 235 GB (SSD) | NVME | reserved.gpu.4cpu.16gib.nvme | 
| Linux GPU | 8 | 32 GiB | 435 GB (SSD) | NVME | reserved.gpu.8cpu.32gib.nvme | 
| Linux GPU | 16 | 64 GiB | 585 GB (SSD) | NVME | reserved.gpu.16cpu.64gib.nvme | 
| Linux GPU | 48 | 192 GiB | 3785 GB (SSD) | NVME | reserved.gpu.48cpu.192gib.nvme | 
| macOS | 8 | 24 GiB | 128 GB | GENERAL | reserved.arm.m2.8cpu.24gib | 
| macOS | 12 | 32 GiB | 256 GB | GENERAL | reserved.arm.m2.12cpu.32gib | 
| Windows | 2 | 4 GiB | 64 GB | GENERAL | reserved.x86-64.2cpu.4gib | 
| Windows | 4 | 8 GiB | 128 GB | GENERAL | reserved.x86-64.4cpu.8gib | 
| Windows | 8 | 16 GiB | 128 GB | GENERAL | reserved.x86-64.8cpu.16gib | 
| Windows | 16 | 32 GiB | 256 GB | GENERAL | reserved.x86-64.16cpu.32gib | 
| Windows | 36 | 72 GiB | 256 GB | GENERAL | reserved.x86-64.36cpu.72gib | 
| Windows | 48 | 96 GiB | 512 GB | GENERAL | reserved.x86-64.48cpu.96gib | 
| Windows | 72 | 144 GiB | 824 GB | GENERAL | reserved.x86-64.72cpu.144gib | 
| Windows | 96 | 192 GiB | 824 GB | GENERAL | reserved.x86-64.96cpu.192gib | 
| Windows EC2 | 4 | 8 GiB | 128 GB | GENERAL | reserved.x86-64.4cpu.8gib | 
| Windows EC2 | 8 | 16 GiB | 128 GB | GENERAL | reserved.x86-64.8cpu.16gib | 

For more information on the pricing identifier, see [https://aws.amazon.com/codebuild/pricing/](https://aws.amazon.com/codebuild/pricing/).

------
#### [ Europe (Frankfurt) ]


| Environment type | vCPUs | Memory | Disk space | Machine type | Compute instance type | 
| --- | --- | --- | --- | --- | --- | 
| ARM | 2 | 4 GiB | 64 GB | GENERAL | reserved.arm.2cpu.4gib | 
| ARM | 4 | 8 GiB | 128 GB | GENERAL | reserved.arm.4cpu.8gib | 
| ARM | 8 | 16 GiB | 128 GB | GENERAL | reserved.arm.8cpu.16gib | 
| ARM | 16 | 32 GiB | 256 GB | GENERAL | reserved.arm.16cpu.32gib | 
| ARM | 32 | 64 GiB | 256 GB | GENERAL | reserved.arm.32cpu.64gib | 
| ARM | 48 | 96 GiB | 512 GB | GENERAL | reserved.arm.48cpu.96gib | 
| ARM | 64 | 128 GiB | 824 GB | GENERAL | reserved.arm.64cpu.128gib | 
| ARM EC2 | 2 | 4 GiB | 64 GB | GENERAL | reserved.arm.2cpu.4gib | 
| ARM EC2 | 4 | 8 GiB | 128 GB | GENERAL | reserved.arm.4cpu.8gib | 
| ARM EC2 | 8 | 16 GiB | 128 GB | GENERAL | reserved.arm.8cpu.16gib | 
| Linux | 2 | 4 GiB | 64 GB | GENERAL | reserved.x86-64.2cpu.4gib | 
| Linux | 4 | 8 GiB | 128 GB | GENERAL | reserved.x86-64.4cpu.8gib | 
| Linux | 8 | 16 GiB | 128 GB | GENERAL | reserved.x86-64.8cpu.16gib | 
| Linux | 16 | 32 GiB | 256 GB | GENERAL | reserved.x86-64.16cpu.32gib | 
| Linux | 36 | 72 GiB | 256 GB | GENERAL | reserved.x86-64.36cpu.72gib | 
| Linux | 48 | 96 GiB | 512 GB | GENERAL | reserved.x86-64.48cpu.96gib | 
| Linux | 72 | 144 GiB | 824 GB | GENERAL | reserved.x86-64.72cpu.144gib | 
| Linux | 96 | 192 GiB | 824 GB | GENERAL | reserved.x86-64.96cpu.192gib | 
| Linux | 72 | 144 GiB | 824 GB (SSD) | NVME | reserved.x86-64.72cpu.144gib.nvme | 
| Linux EC2 | 2 | 4 GiB | 64 GB | GENERAL | reserved.x86-64.2cpu.4gib | 
| Linux EC2 | 4 | 8 GiB | 128 GB | GENERAL | reserved.x86-64.4cpu.8gib | 
| Linux EC2 | 8 | 16 GiB | 128 GB | GENERAL | reserved.x86-64.8cpu.16gib | 
| Linux GPU | 4 | 16 GiB | 235 GB (SSD) | NVME | reserved.gpu.4cpu.16gib.nvme | 
| Linux GPU | 8 | 32 GiB | 435 GB (SSD) | NVME | reserved.gpu.8cpu.32gib.nvme | 
| Linux GPU | 16 | 64 GiB | 585 GB (SSD) | NVME | reserved.gpu.16cpu.64gib.nvme | 
| Linux GPU | 32 | 128 GiB | 885 GB (SSD) | NVME | reserved.gpu.32cpu.128gib.nvme | 
| Linux GPU | 48 | 192 GiB | 3785 GB (SSD) | NVME | reserved.gpu.48cpu.192gib.nvme | 
| macOS | 8 | 24 GiB | 128 GB | GENERAL | reserved.arm.m2.8cpu.24gib | 
| Windows | 2 | 4 GiB | 64 GB | GENERAL | reserved.x86-64.2cpu.4gib | 
| Windows | 4 | 8 GiB | 128 GB | GENERAL | reserved.x86-64.4cpu.8gib | 
| Windows | 8 | 16 GiB | 128 GB | GENERAL | reserved.x86-64.8cpu.16gib | 
| Windows | 16 | 32 GiB | 256 GB | GENERAL | reserved.x86-64.16cpu.32gib | 
| Windows | 36 | 72 GiB | 256 GB | GENERAL | reserved.x86-64.36cpu.72gib | 
| Windows | 48 | 96 GiB | 512 GB | GENERAL | reserved.x86-64.48cpu.96gib | 
| Windows | 72 | 144 GiB | 824 GB | GENERAL | reserved.x86-64.72cpu.144gib | 
| Windows | 96 | 192 GiB | 824 GB | GENERAL | reserved.x86-64.96cpu.192gib | 
| Windows EC2 | 4 | 8 GiB | 128 GB | GENERAL | reserved.x86-64.4cpu.8gib | 
| Windows EC2 | 8 | 16 GiB | 128 GB | GENERAL | reserved.x86-64.8cpu.16gib | 

For more information on the pricing identifier, see [https://aws.amazon.com/codebuild/pricing/](https://aws.amazon.com/codebuild/pricing/).

------
#### [ Europe (Ireland) ]


| Environment type | vCPUs | Memory | Disk space | Machine type | Compute instance type | 
| --- | --- | --- | --- | --- | --- | 
| ARM | 2 | 4 GiB | 64 GB | GENERAL | reserved.arm.2cpu.4gib | 
| ARM | 4 | 8 GiB | 128 GB | GENERAL | reserved.arm.4cpu.8gib | 
| ARM | 8 | 16 GiB | 128 GB | GENERAL | reserved.arm.8cpu.16gib | 
| ARM | 16 | 32 GiB | 256 GB | GENERAL | reserved.arm.16cpu.32gib | 
| ARM | 32 | 64 GiB | 256 GB | GENERAL | reserved.arm.32cpu.64gib | 
| ARM | 48 | 96 GiB | 512 GB | GENERAL | reserved.arm.48cpu.96gib | 
| ARM | 64 | 128 GiB | 824 GB | GENERAL | reserved.arm.64cpu.128gib | 
| ARM EC2 | 2 | 4 GiB | 64 GB | GENERAL | reserved.arm.2cpu.4gib | 
| ARM EC2 | 4 | 8 GiB | 128 GB | GENERAL | reserved.arm.4cpu.8gib | 
| ARM EC2 | 8 | 16 GiB | 128 GB | GENERAL | reserved.arm.8cpu.16gib | 
| Linux | 2 | 4 GiB | 64 GB | GENERAL | reserved.x86-64.2cpu.4gib | 
| Linux | 4 | 8 GiB | 128 GB | GENERAL | reserved.x86-64.4cpu.8gib | 
| Linux | 8 | 16 GiB | 128 GB | GENERAL | reserved.x86-64.8cpu.16gib | 
| Linux | 16 | 32 GiB | 256 GB | GENERAL | reserved.x86-64.16cpu.32gib | 
| Linux | 36 | 72 GiB | 256 GB | GENERAL | reserved.x86-64.36cpu.72gib | 
| Linux | 48 | 96 GiB | 512 GB | GENERAL | reserved.x86-64.48cpu.96gib | 
| Linux | 72 | 144 GiB | 824 GB | GENERAL | reserved.x86-64.72cpu.144gib | 
| Linux | 96 | 192 GiB | 824 GB | GENERAL | reserved.x86-64.96cpu.192gib | 
| Linux | 48 | 96 GiB | 824 GB (SSD) | NVME | reserved.x86-64.48cpu.96gib.nvme | 
| Linux | 72 | 144 GiB | 824 GB (SSD) | NVME | reserved.x86-64.72cpu.144gib.nvme | 
| Linux EC2 | 2 | 4 GiB | 64 GB | GENERAL | reserved.x86-64.2cpu.4gib | 
| Linux EC2 | 4 | 8 GiB | 128 GB | GENERAL | reserved.x86-64.4cpu.8gib | 
| Linux EC2 | 8 | 16 GiB | 128 GB | GENERAL | reserved.x86-64.8cpu.16gib | 
| Linux GPU | 4 | 16 GiB | 235 GB (SSD) | NVME | reserved.gpu.4cpu.16gib.nvme | 
| Linux GPU | 8 | 32 GiB | 435 GB (SSD) | NVME | reserved.gpu.8cpu.32gib.nvme | 
| Linux GPU | 16 | 64 GiB | 585 GB (SSD) | NVME | reserved.gpu.16cpu.64gib.nvme | 
| Linux GPU | 32 | 128 GiB | 885 GB (SSD) | NVME | reserved.gpu.32cpu.128gib.nvme | 
| Linux GPU | 48 | 192 GiB | 3785 GB (SSD) | NVME | reserved.gpu.48cpu.192gib.nvme | 
| Windows | 2 | 4 GiB | 64 GB | GENERAL | reserved.x86-64.2cpu.4gib | 
| Windows | 4 | 8 GiB | 128 GB | GENERAL | reserved.x86-64.4cpu.8gib | 
| Windows | 8 | 16 GiB | 128 GB | GENERAL | reserved.x86-64.8cpu.16gib | 
| Windows | 16 | 32 GiB | 256 GB | GENERAL | reserved.x86-64.16cpu.32gib | 
| Windows | 36 | 72 GiB | 256 GB | GENERAL | reserved.x86-64.36cpu.72gib | 
| Windows | 48 | 96 GiB | 512 GB | GENERAL | reserved.x86-64.48cpu.96gib | 
| Windows | 72 | 144 GiB | 824 GB | GENERAL | reserved.x86-64.72cpu.144gib | 
| Windows | 96 | 192 GiB | 824 GB | GENERAL | reserved.x86-64.96cpu.192gib | 
| Windows EC2 | 4 | 8 GiB | 128 GB | GENERAL | reserved.x86-64.4cpu.8gib | 
| Windows EC2 | 8 | 16 GiB | 128 GB | GENERAL | reserved.x86-64.8cpu.16gib | 

For more information on the pricing identifier, see [https://aws.amazon.com/codebuild/pricing/](https://aws.amazon.com/codebuild/pricing/).

------
#### [ South America (São Paulo) ]


| Environment type | vCPUs | Memory | Disk space | Machine type | Compute instance type | 
| --- | --- | --- | --- | --- | --- | 
| ARM | 2 | 4 GiB | 64 GB | GENERAL | reserved.arm.2cpu.4gib | 
| ARM | 4 | 8 GiB | 128 GB | GENERAL | reserved.arm.4cpu.8gib | 
| ARM | 8 | 16 GiB | 128 GB | GENERAL | reserved.arm.8cpu.16gib | 
| ARM | 16 | 32 GiB | 256 GB | GENERAL | reserved.arm.16cpu.32gib | 
| ARM | 32 | 64 GiB | 256 GB | GENERAL | reserved.arm.32cpu.64gib | 
| ARM | 48 | 96 GiB | 512 GB | GENERAL | reserved.arm.48cpu.96gib | 
| ARM EC2 | 2 | 4 GiB | 64 GB | GENERAL | reserved.arm.2cpu.4gib | 
| ARM EC2 | 4 | 8 GiB | 128 GB | GENERAL | reserved.arm.4cpu.8gib | 
| ARM EC2 | 8 | 16 GiB | 128 GB | GENERAL | reserved.arm.8cpu.16gib | 
| Linux | 2 | 4 GiB | 64 GB | GENERAL | reserved.x86-64.2cpu.4gib | 
| Linux | 4 | 8 GiB | 128 GB | GENERAL | reserved.x86-64.4cpu.8gib | 
| Linux | 8 | 16 GiB | 128 GB | GENERAL | reserved.x86-64.8cpu.16gib | 
| Linux | 16 | 32 GiB | 256 GB | GENERAL | reserved.x86-64.16cpu.32gib | 
| Linux | 36 | 72 GiB | 256 GB | GENERAL | reserved.x86-64.36cpu.72gib | 
| Linux | 48 | 96 GiB | 512 GB | GENERAL | reserved.x86-64.48cpu.96gib | 
| Linux | 72 | 144 GiB | 824 GB | GENERAL | reserved.x86-64.72cpu.144gib | 
| Linux | 72 | 144 GiB | 824 GB (SSD) | NVME | reserved.x86-64.72cpu.144gib.nvme | 
| Linux EC2 | 2 | 4 GiB | 64 GB | GENERAL | reserved.x86-64.2cpu.4gib | 
| Linux EC2 | 4 | 8 GiB | 128 GB | GENERAL | reserved.x86-64.4cpu.8gib | 
| Linux EC2 | 8 | 16 GiB | 128 GB | GENERAL | reserved.x86-64.8cpu.16gib | 
| Windows | 2 | 4 GiB | 64 GB | GENERAL | reserved.x86-64.2cpu.4gib | 
| Windows | 4 | 8 GiB | 128 GB | GENERAL | reserved.x86-64.4cpu.8gib | 
| Windows | 8 | 16 GiB | 128 GB | GENERAL | reserved.x86-64.8cpu.16gib | 
| Windows | 16 | 32 GiB | 256 GB | GENERAL | reserved.x86-64.16cpu.32gib | 
| Windows | 36 | 72 GiB | 256 GB | GENERAL | reserved.x86-64.36cpu.72gib | 
| Windows | 48 | 96 GiB | 512 GB | GENERAL | reserved.x86-64.48cpu.96gib | 
| Windows | 72 | 144 GiB | 824 GB | GENERAL | reserved.x86-64.72cpu.144gib | 
| Windows EC2 | 4 | 8 GiB | 128 GB | GENERAL | reserved.x86-64.4cpu.8gib | 
| Windows EC2 | 8 | 16 GiB | 128 GB | GENERAL | reserved.x86-64.8cpu.16gib | 

For more information on the pricing identifier, see [https://aws.amazon.com/codebuild/pricing/](https://aws.amazon.com/codebuild/pricing/).

------

To choose a compute type:
+ In the CodeBuild console, in the **Compute fleet configuration** page, choose one of the options from **vCPUs**, **Memory**, and **Disk**. For more information, see [Create a reserved capacity fleet](fleets.md#fleets.how-to).
+ For the AWS CLI, run the `create-fleet` or `update-fleet` command, specifying the value of `computeType` to `ATTRIBUTE_BASED_COMPUTE`. For more information, see [ create-fleet](https://docs.aws.amazon.com/cli/latest/reference/codebuild/create-fleet.html) or [ update-fleet](https://docs.aws.amazon.com/cli/latest/reference/codebuild/update-fleet.html).
+ For the AWS SDKs, call the equivalent of the `CreateFleet` or `UpdateFleet` operation for your target programming language, specifying the value of `computeType` to `ATTRIBUTE_BASED_COMPUTE`. For more information, see the [AWS SDKs and tools reference](sdk-ref.md).

**Note**  
For the AWS CLI and AWS SDKs, you can still use `computeType` inputs such as `BUILD_GENERAL1_SMALL`, to choose the compute types instead of `ATTRIBUTE_BASED_COMPUTE`. For more information, see [About on-demand environment types](#environment.types).

### Supported instance families
<a name="environment-reserved-capacity.instance-types"></a>

AWS CodeBuild supports the following instances for reserved capacity fleets.:
+ **General purpose:** M5 \$1 M5a \$1 M5ad \$1 M5d \$1 M5dn \$1 M5n \$1 M5zn \$1 M6a \$1 M6g \$1 M6gd \$1 M6i \$1 M6id \$1 M6idn \$1 M6in \$1 M7a \$1 M7g \$1 M7gd \$1 M7i \$1 M7i-flex \$1 M8g \$1 T3 \$1 T3a \$1 T4g
+ **Compute optimized:** C5 \$1 C5a \$1 C5ad \$1 C5d \$1 C5n \$1 C6a \$1 C6g \$1 C6gd \$1 C6gn \$1 C6i \$1 C6id \$1 C6in \$1 C7a \$1 C7g \$1 C7gd \$1 C7gn \$1 C7i \$1 C7i-flex \$1 C8g
+ **Memory optimized:** R5 \$1 R5a \$1 R5ad \$1 R5b \$1 R5d \$1 R5dn \$1 R5n \$1 R6a \$1 R6g \$1 R6gd \$1 R6i \$1 R6idn \$1 R6in \$1 R6id \$1 R7a \$1 R7g \$1 R7gd \$1 R7i \$1 R7iz \$1 R8g \$1 U-3tb1 \$1 U-6tb1 \$1 U-9tb1 \$1 U-12tb1 \$1 U-18tb1 \$1 U-24tb1 \$1 U7i-6tb \$1 U7i-8tb \$1 U7i-12tb \$1 U7in-16tb \$1 U7in-24tb \$1 U7in-32tb \$1 X1 \$1 X1e \$1 X2gd \$1 X2idn \$1 X2iedn \$1 X2iezn \$1 X8g \$1 z1d
+ **Storage optimized:** D3 \$1 D3en \$1 I3 \$1 I3en \$1 I4g \$1 I4i \$1 I7ie \$1 I8g \$1 Im4gn \$1 Is4gen
+ **Accelerated computing:** DL1 \$1 DL2q \$1 F1 \$1 F2 \$1 G4ad \$1 G4dn \$1 G5 \$1 G5g \$1 G6 \$1 G6e \$1 Gr6 \$1 Inf1 \$1 Inf2 \$1 P3 \$1 P3dn \$1 P4d \$1 P5 \$1 P5e \$1 P5en \$1 Trn1 \$1 Trn1n \$1 Trn2 \$1 VT1
+ **High-performance computing:** Hpc6a \$1 Hpc6id \$1 Hpc7a \$1 Hpc7g
+ **Previous generation:** A1

To create a reserved capacity fleet with a specific instance type:
+ In the CodeBuild console, in the **Compute fleet configuration** page, navigate to the **Capacity configuration** section. In **Compute selection mode**, select **Manual input** and in **Compute instance type** choose one of the instance types from the drop-down menu. For more information, see [Create a reserved capacity fleet](fleets.md#fleets.how-to).
+ For the AWS CLI, run the `create-fleet` or `update-fleet` command, specifying the value of `computeType` to `CUSTOM_INSTANCE_TYPE` and the `ComputeConfiguration` `instanceType` to the specified instance type. For more information, see [ create-fleet](https://docs.aws.amazon.com/cli/latest/reference/codebuild/create-fleet.html) or [ update-fleet](https://docs.aws.amazon.com/cli/latest/reference/codebuild/update-fleet.html).
+ For the AWS SDKs, call the equivalent of the `CreateFleet` or `UpdateFleet` operation for your target programming language, specifying the value of `computeType` to `CUSTOM_INSTANCE_TYPE` and the **ComputeConfiguration** `instanceType` to the specified instance type. For more information, see the [AWS SDKs and tools reference](sdk-ref.md).

## About on-demand environment types
<a name="environment.types"></a>

AWS CodeBuild provides build environments with the following available memory, vCPUs, and disk space for EC2 compute mode:


| Compute type | Environment computeType value | Environment type value | Memory | vCPUs | Disk space | 
| --- | --- | --- | --- | --- | --- | 
| ARM Small ¹ | BUILD\$1GENERAL1\$1SMALL |  `ARM_CONTAINER` `ARM_EC2`  | 4 GiB | 2 | 64 GB | 
| ARM Medium ¹ | BUILD\$1GENERAL1\$1MEDIUM |  `ARM_CONTAINER` `ARM_EC2`  | 8 GiB | 4 | 128 GB | 
| ARM Large ¹ | BUILD\$1GENERAL1\$1LARGE |  `ARM_CONTAINER` `ARM_EC2`  | 16 GiB | 8 | 128 GB | 
| ARM XLarge ¹ | BUILD\$1GENERAL1\$1XLARGE | ARM\$1CONTAINER | 64 GiB | 32 | 256 GB | 
| ARM 2XLarge ¹ | BUILD\$1GENERAL1\$12XLARGE | ARM\$1CONTAINER | 96 GiB | 48 | 824 GB | 
| Linux Small ¹ | BUILD\$1GENERAL1\$1SMALL |  `LINUX_CONTAINER` `LINUX_EC2`  | 4 GiB | 2 | 64 GB | 
| Linux Medium ¹ | BUILD\$1GENERAL1\$1MEDIUM |  `LINUX_CONTAINER` `LINUX_EC2`  | 8 GiB | 4 | 128 GB | 
| Linux Large ¹ | BUILD\$1GENERAL1\$1LARGE |  `LINUX_CONTAINER` `LINUX_EC2`  | 16 GiB | 8 | 128 GB | 
| Linux XLarge ¹ | BUILD\$1GENERAL1\$1XLARGE | LINUX\$1CONTAINER | 72 GiB | 36 | 256 GB | 
| Linux 2XLarge | BUILD\$1GENERAL1\$12XLARGE | LINUX\$1CONTAINER | 144 GiB | 72 | 824 GB (SSD) | 
| Linux GPU Small | BUILD\$1GENERAL1\$1SMALL | LINUX\$1GPU\$1CONTAINER | 16 GiB | 4 | 235 GB (SSD)  | 
| Linux GPU Large | BUILD\$1GENERAL1\$1LARGE | LINUX\$1GPU\$1CONTAINER | 255 GiB | 32 | 50 GB  | 
| Windows Medium ¹ | BUILD\$1GENERAL1\$1MEDIUM |  `WINDOWS_SERVER_2019_CONTAINER` `WINDOWS_SERVER_2022_CONTAINER` `WINDOWS_EC2`  | 8 GiB | 4 | 128 GB | 
| Windows Large ¹ | BUILD\$1GENERAL1\$1LARGE |  `WINDOWS_SERVER_2019_CONTAINER` `WINDOWS_SERVER_2022_CONTAINER` `WINDOWS_EC2`  | 16 GiB | 8 | 128 GB | 
| Windows XLarge ¹ | BUILD\$1GENERAL1\$1XLARGE |  `WINDOWS_SERVER_2022_CONTAINER`  | 72 GiB | 36 | 256 GB | 
| Windows 2XLarge ¹ | BUILD\$1GENERAL1\$12XLARGE |  `WINDOWS_SERVER_2022_CONTAINER`  | 144 GiB | 72 | 824 GB | 

¹ The latest version of this image type is cached. If you specify a more specific version, then CodeBuild provisions that version instead of the cached version. This can result in longer build times. For example, to benefit from caching, specify `aws/codebuild/amazonlinux-x86_64-standard:5.0` instead of a more granular version, such as `aws/codebuild/amazonlinux-x86_64-standard:5.0-1.0.0`. 

AWS CodeBuild provides build environments with the following available memory and disk space for AWS Lambda compute mode:


| Compute type | Environment computeType value | Environment type value | Memory | Disk space | 
| --- | --- | --- | --- | --- | 
| ARM Lambda 1GB | BUILD\$1LAMBDA\$11GB | ARM\$1LAMBDA\$1CONTAINER | 1 GiB | 10 GB | 
| ARM Lambda 2GB | BUILD\$1LAMBDA\$12GB | ARM\$1LAMBDA\$1CONTAINER | 2 GiB | 10 GB | 
| ARM Lambda 4GB | BUILD\$1LAMBDA\$14GB | ARM\$1LAMBDA\$1CONTAINER | 4 GiB | 10 GB | 
| ARM Lambda 8GB | BUILD\$1LAMBDA\$18GB | ARM\$1LAMBDA\$1CONTAINER | 8 GiB | 10 GB | 
| ARM Lambda 10GB | BUILD\$1LAMBDA\$110GB | ARM\$1LAMBDA\$1CONTAINER | 10 GiB | 10 GB | 
| Linux Lambda 1GB | BUILD\$1LAMBDA\$11GB | LINUX\$1LAMBDA\$1CONTAINER | 1 GiB | 10 GB | 
| Linux Lambda 2GB | BUILD\$1LAMBDA\$12GB | LINUX\$1LAMBDA\$1CONTAINER | 2 GiB | 10 GB | 
| Linux Lambda 4GB | BUILD\$1LAMBDA\$14GB | LINUX\$1LAMBDA\$1CONTAINER | 4 GiB | 10 GB | 
| Linux Lambda 8GB | BUILD\$1LAMBDA\$18GB | LINUX\$1LAMBDA\$1CONTAINER | 8 GiB | 10 GB | 
| Linux Lambda 10GB | BUILD\$1LAMBDA\$110GB | LINUX\$1LAMBDA\$1CONTAINER | 10 GiB | 10 GB | 

When using other environment types, it is recommended that you use a cached image to reduce build times.

The disk space listed for each build environment is available only in the directory specified by the `CODEBUILD_SRC_DIR` environment variable.

To choose a compute type:
+ In the CodeBuild console, in the **Create build project** wizard or **Edit Build Project** page, in **Environment** expand **Additional configuration**, and then choose one of the options from **Compute type**. For more information, see [Create a build project (console)](create-project.md#create-project-console) or [Change a build project's settings (console)](change-project.md#change-project-console).
+ For the AWS CLI, run the `create-project` or `update-project` command, specifying the `computeType` value of the `environment` object. For more information, see [Create a build project (AWS CLI)](create-project.md#create-project-cli) or [Change a build project's settings (AWS CLI)](change-project.md#change-project-cli).
+ For the AWS SDKs, call the equivalent of the `CreateProject` or `UpdateProject` operation for your target programming language, specifying the equivalent of `computeType` value of the `environment` object. For more information, see the [AWS SDKs and tools reference](sdk-ref.md).

Some environment and compute types have Region availability limitations: 
+ The compute type Linux GPU Small (`LINUX_GPU_CONTAINER`) is only available in these Regions:
  + US East (N. Virginia)
  + US West (Oregon)
  + Asia Pacific (Tokyo)
  + Canada (Central)
  + Europe (Frankfurt)
  + Europe (Ireland)
  + Europe (London)
+ The compute type Linux GPU Large (`LINUX_GPU_CONTAINER`) is only available in these Regions:
  + US East (Ohio)
  + US East (N. Virginia)
  + US West (Oregon)
  + Asia Pacific (Seoul)
  + Asia Pacific (Sydney)
  + Asia Pacific (Tokyo)
  + Canada (Central)
  + China (Beijing)
  + China (Ningxia)
  + Europe (Frankfurt)
  + Europe (Ireland)
  + Europe (London)
+ The compute type `BUILD_GENERAL1_2XLARGE` is only available in these Regions:
  + US East (Ohio)
  + US East (N. Virginia)
  + US West (N. California)
  + US West (Oregon)
  + Asia Pacific (Hyderabad)
  + Asia Pacific (Hong Kong)
  + Asia Pacific (Jakarta)
  + Asia Pacific (Melbourne)
  + Asia Pacific (Mumbai)
  + Asia Pacific (Seoul)
  + Asia Pacific (Singapore)
  + Asia Pacific (Sydney)
  + Asia Pacific (Tokyo)
  + Canada (Central)
  + China (Beijing)
  + China (Ningxia)
  + Europe (Frankfurt)
  + Europe (Ireland)
  + Europe (London)
  + Europe (Paris)
  + Europe (Spain)
  + Europe (Stockholm)
  + Europe (Zurich)
  + Israel (Tel Aviv)
  + Middle East (Bahrain)
  + Middle East (UAE)
  + South America (São Paulo)
+ The environment type `ARM_CONTAINER` is only available in these Regions:
  + US East (Ohio)
  + US East (N. Virginia)
  + US West (N. California)
  + US West (Oregon)
  + Asia Pacific (Hong Kong)
  + Asia Pacific (Jakarta)
  + Asia Pacific (Hyderabad)
  + Asia Pacific (Mumbai)
  + Asia Pacific (Osaka)
  + Asia Pacific (Seoul)
  + Asia Pacific (Singapore)
  + Asia Pacific (Sydney)
  + Asia Pacific (Tokyo)
  + Canada (Central)
  + China (Beijing)
  + China (Ningxia)
  + Europe (Frankfurt)
  + Europe (Ireland)
  + Europe (London)
  + Europe (Milan)
  + Europe (Paris)
  + Europe (Spain)
  + Europe (Stockholm)
  + Israel (Tel Aviv)
  + Middle East (Bahrain)
  + Middle East (UAE)
  + South America (São Paulo)
+ The environment type `WINDOWS_SERVER_2022_CONTAINER` is only available in these Regions:
  + US East (Ohio)
  + US East (N. Virginia)
  + US West (Oregon)
  + Asia Pacific (Sydney)
  + Asia Pacific (Tokyo)
  + Europe (Frankfurt)
  + Europe (Ireland)
  + South America (São Paulo)
+ The environment type `LINUX_EC2` (`BUILD_GENERAL1_SMALL`, `BUILD_GENERAL1_MEDIUM`, `BUILD_GENERAL1_LARGE`) is only available in these Regions:
  + US East (Ohio)
  + US East (N. Virginia)
  + US West (N. California)
  + US West (Oregon)
  + Africa (Cape Town)
  + Asia Pacific (Hong Kong)
  + Asia Pacific (Jakarta)
  + Asia Pacific (Melbourne)
  + Europe (Zurich)
  + Asia Pacific (Hyderabad)
  + Asia Pacific (Mumbai)
  + Asia Pacific (Osaka)
  + Asia Pacific (Seoul)
  + Asia Pacific (Singapore)
  + Asia Pacific (Sydney)
  + Asia Pacific (Tokyo)
  + Canada (Central)
  + China (Beijing)
  + China (Ningxia)
  + Europe (Frankfurt)
  + Europe (Ireland)
  + Europe (London)
  + Europe (Milan)
  + Europe (Paris)
  + Europe (Spain)
  + Europe (Stockholm)
  + Israel (Tel Aviv)
  + Middle East (Bahrain)
  + Middle East (UAE)
  + South America (São Paulo)
  + AWS GovCloud (US-West)
  + AWS GovCloud (US-East)
+ The environment type `ARM_EC2` (`BUILD_GENERAL1_SMALL`, `BUILD_GENERAL1_MEDIUM`, `BUILD_GENERAL1_LARGE`) is only available in these Regions:
  + US East (Ohio)
  + US East (N. Virginia)
  + US West (N. California)
  + US West (Oregon)
  + Asia Pacific (Hong Kong)
  + Asia Pacific (Jakarta)
  + Europe (Zurich)
  + Asia Pacific (Hyderabad)
  + Asia Pacific (Mumbai)
  + Asia Pacific (Osaka)
  + Asia Pacific (Seoul)
  + Asia Pacific (Singapore)
  + Asia Pacific (Sydney)
  + Asia Pacific (Tokyo)
  + Canada (Central)
  + China (Beijing)
  + China (Ningxia)
  + Europe (Frankfurt)
  + Europe (Ireland)
  + Europe (London)
  + Europe (Milan)
  + Europe (Paris)
  + Europe (Spain)
  + Europe (Stockholm)
  + Israel (Tel Aviv)
  + Middle East (Bahrain)
  + South America (São Paulo)
  + AWS GovCloud (US-West)
  + AWS GovCloud (US-East)
+ The environment type `WINDOWS_EC2` (`BUILD_GENERAL1_MEDIUM`, `BUILD_GENERAL1_LARGE`) is only available in these Regions:
  + US East (Ohio)
  + US East (N. Virginia)
  + US West (Oregon)
  + Asia Pacific (Sydney)
  + Asia Pacific (Tokyo)
  + Europe (Frankfurt)
  + Europe (Ireland)
  + South America (São Paulo)
+ The compute mode AWS Lambda (`ARM_LAMBDA_CONTAINER` and `LINUX_LAMBDA_CONTAINER`) is only available in these Regions:
  + US East (N. Virginia)
  + US East (Ohio)
  + US West (Oregon)
  + Asia Pacific (Mumbai)
  + Asia Pacific (Singapore)
  + Asia Pacific (Sydney)
  + Asia Pacific (Tokyo)
  + Europe (Frankfurt)
  + Europe (Ireland)
  + South America (São Paulo)
+ The compute mode `MAC_ARM` is only available in these Regions:
  + US East (N. Virginia)
  + US East (Ohio)
  + US West (Oregon)
  + Asia Pacific (Sydney)
  + Europe (Frankfurt)

For the compute type `BUILD_GENERAL1_2XLARGE`, Docker images up to 100 GB uncompressed are supported.

**Note**  
For custom build environment images, CodeBuild supports Docker images up to 50 GB uncompressed in Linux and Windows, regardless of the compute type. To check your build image's size, use Docker to run the `docker images REPOSITORY:TAG` command.

You can use Amazon EFS to access more space in your build container. For more information, see [Amazon Elastic File System sample for AWS CodeBuild](sample-efs.md). If you want to manipulate container disk space during a build, then the build must run in privileged mode.

**Note**  
By default, Docker daemon is enabled for non-VPC builds. If you would like to use Docker containers for VPC builds, see [Runtime Privilege and Linux Capabilities](https://docs.docker.com/engine/reference/run/#runtime-privilege-and-linux-capabilities) on the Docker Docs website and enable privileged mode. Also, Windows does not support privileged mode.

# Shells and commands in build environments
<a name="build-env-ref-cmd"></a>

You provide a set of commands for AWS CodeBuild to run in a build environment during the lifecycle of a build (for example, installing build dependencies and testing and compiling your source code). There are several ways to specify these commands:
+ Create a build specification file and include it with your source code. In this file, specify the commands you want to run in each phase of the build lifecycle. For more information, see the [Build specification reference for CodeBuild](build-spec-ref.md).
+ Use the CodeBuild console to create a build project. In **Insert build commands**, for **Build commands**, enter the commands you want to run in the `build` phase. For more information, see [Create a build project (console)](create-project.md#create-project-console).
+ Use the CodeBuild console to change the settings of a build project. In **Insert build commands**, for **Build commands**, enter the commands you want to run in the `build` phase. For more information, see [Change a build project's settings (console)](change-project.md#change-project-console).
+ Use the AWS CLI or AWS SDKs to create a build project or change the settings of a build project. Reference the source code that contains a buildspec file with your commands, or specify a single string that includes the contents of an equivalent buildspec file. For more information, see [Create a build project](create-project.md) or [Change build project settings](change-project.md).
+ Use the AWS CLI or AWS SDKs to start a build, specifying a buildspec file or a single string that includes the contents of an equivalent buildspec file. For more information, see the description for the `buildspecOverride` value in [Run builds manually](run-build.md).

You can specify any Shell Command Language (sh) command. In buildspec version 0.1, CodeBuild runs each Shell command in a separate instance in the build environment. This means that each command runs in isolation from all other commands. Therefore, by default, you cannot run a single command that relies on the state of any previous commands (for example, changing directories or setting environment variables). To get around this limitation, we recommend that you use version 0.2, which solves this issue. If you must use version 0.1, we recommend the following approaches:
+ Include a shell script in your source code that contains the commands you want to run in a single instance of the default shell. For example, you could include a file named `my-script.sh` in your source code that contains commands such as `cd MyDir; mkdir -p mySubDir; cd mySubDir; pwd;`. Then, in your buildspec file, specify the command `./my-script.sh`. 
+ In your buildspec file or on the **Build commands** setting for the `build` phase only, enter a single command that includes all of the commands you want to run in a single instance of the default shell (for example, `cd MyDir && mkdir -p mySubDir && cd mySubDir && pwd`). 

If CodeBuild encounters an error, the error might be more difficult to troubleshoot compared to running a single command in its own instance of the default shell.

Commands that are run in a Windows Server Core image use the PowerShell shell.

# Environment variables in build environments
<a name="build-env-ref-env-vars"></a>

AWS CodeBuild provides several environment variables that you can use in your build commands:

AWS\$1DEFAULT\$1REGION  
The AWS Region where the build is running (for example, `us-east-1`). This environment variable is used primarily by the AWS CLI.

AWS\$1REGION  
The AWS Region where the build is running (for example, `us-east-1`). This environment variable is used primarily by the AWS SDKs.

CODEBUILD\$1BATCH\$1BUILD\$1IDENTIFIER  
The identifier of the build in a batch build. This is specified in the batch buildspec. For more information, see [Batch build buildspec reference](batch-build-buildspec.md).

CODEBUILD\$1BUILD\$1ARN  
The Amazon Resource Name (ARN) of the build (for example, `arn:aws:codebuild:region-ID:account-ID:build/codebuild-demo-project:b1e6661e-e4f2-4156-9ab9-82a19EXAMPLE`).

CODEBUILD\$1BUILD\$1ID  
The CodeBuild ID of the build (for example, `codebuild-demo-project:b1e6661e-e4f2-4156-9ab9-82a19EXAMPLE`).

CODEBUILD\$1BUILD\$1IMAGE  
The CodeBuild build image identifier (for example, `aws/codebuild/standard:2.0`).

CODEBUILD\$1BUILD\$1NUMBER  
The current build number for the project.

CODEBUILD\$1BUILD\$1SUCCEEDING  
Whether the current build is succeeding. Set to `0` if the build is failing, or `1` if the build is succeeding.

CODEBUILD\$1INITIATOR  
The entity that started the build. If CodePipeline started the build, this is the pipeline's name (for example, `codepipeline/my-demo-pipeline`). If an user started the build, this is the user's name (for example, `MyUserName`). If the Jenkins plugin for CodeBuild started the build, this is the string `CodeBuild-Jenkins-Plugin`.

CODEBUILD\$1KMS\$1KEY\$1ID  
The identifier of the AWS KMS key that CodeBuild is using to encrypt the build output artifact (for example, `arn:aws:kms:region-ID:account-ID:key/key-ID` or `alias/key-alias`).

CODEBUILD\$1PROJECT\$1ARN  
The Amazon Resource Name (ARN) of the project (for example, `arn:aws:codebuild:region-ID:account-ID:project/project-name`).

CODEBUILD\$1PUBLIC\$1BUILD\$1URL  
The URL of the build results for this build on the public builds website. This variable is only set if the build project has public builds enabled. For more information, see [Get public build project URLs](public-builds.md).

CODEBUILD\$1RESOLVED\$1SOURCE\$1VERSION  <a name="CODEBUILD_RESOLVED_SOURCE_VERSION"></a>
The version identifier of a build's source code. The contents depends on the source code repository:    
CodeCommit, GitHub, GitHub Enterprise Server, and Bitbucket  
This variable contains the commit ID.  
CodePipeline  
This variable contains the source revision provided by CodePipeline.   
If CodePipeline is not able to resolve the source revision, such as when the source is an Amazon S3 bucket that does not have versioning enabled, this environment variable is not set.  
Amazon S3  
This variable is not set.
When applicable, the `CODEBUILD_RESOLVED_SOURCE_VERSION` variable is only available after the `DOWNLOAD_SOURCE` phase. 

CODEBUILD\$1SOURCE\$1REPO\$1URL  
The URL to the input artifact or source code repository. For Amazon S3, this is `s3://` followed by the bucket name and path to the input artifact. For CodeCommit and GitHub, this is the repository's clone URL. If a build originates from CodePipeline, this environment variable may be empty.  
For secondary sources, the environment variable for the secondary source repository URL is `CODEBUILD_SOURCE_REPO_URL_<sourceIdentifier>`, where `<sourceIdentifier>` is the source identifier you create. 

CODEBUILD\$1SOURCE\$1VERSION  
The value's format depends on the source repository.  
+ For Amazon S3, it is the version ID associated with the input artifact.
+ For CodeCommit, it is the commit ID or branch name associated with the version of the source code to be built.
+ For GitHub, GitHub Enterprise Server, and Bitbucket it is the commit ID, branch name, or tag name associated with the version of the source code to be built.
**Note**  
For a GitHub or GitHub Enterprise Server build that is triggered by a webhook pull request event, it is `pr/pull-request-number`.
For secondary sources, the environment variable for the secondary source version is `CODEBUILD_SOURCE_VERSION_<sourceIdentifier>`, where `<sourceIdentifier>` is the source identifier you create. For more information, see [Multiple input sources and output artifacts sample](sample-multi-in-out.md).

CODEBUILD\$1SRC\$1DIR  
The directory path that CodeBuild uses for the build (for example, `/tmp/src123456789/src`).  
For secondary sources, the environment variable for the secondary source directory path is `CODEBUILD_SRC_DIR_<sourceIdentifier>`, where `<sourceIdentifier>` is the source identifier you create. For more information, see [Multiple input sources and output artifacts sample](sample-multi-in-out.md).

CODEBUILD\$1START\$1TIME  
The start time of the build specified as a Unix timestamp in milliseconds.

CODEBUILD\$1WEBHOOK\$1ACTOR\$1ACCOUNT\$1ID  
The account ID of the user that triggered the webhook event.

CODEBUILD\$1WEBHOOK\$1BASE\$1REF  
The base reference name of the webhook event that triggers the current build. For a pull request, this is the branch reference.

CODEBUILD\$1WEBHOOK\$1EVENT  
The webhook event that triggers the current build.

CODEBUILD\$1WEBHOOK\$1MERGE\$1COMMIT  <a name="CODEBUILD_WEBHOOK_MERGE_COMMIT"></a>
The identifier of the merge commit used for the build. This variable is set when a Bitbucket pull request is merged with the squash strategy and the pull request branch is closed. In this case, the original pull request commit no longer exists, so this environment variable contains the identifier of the squashed merge commit.

CODEBUILD\$1WEBHOOK\$1PREV\$1COMMIT  
The ID of the most recent commit before the webhook push event that triggers the current build.

CODEBUILD\$1WEBHOOK\$1HEAD\$1REF  
The head reference name of the webhook event that triggers the current build. It can be a branch reference or a tag reference.

CODEBUILD\$1WEBHOOK\$1TRIGGER  
Shows the webhook event that triggered the build. This variable is available only for builds triggered by a webhook. The value is parsed from the payload sent to CodeBuild by GitHub, GitHub Enterprise Server, or Bitbucket. The value's format depends on what type of event triggered the build.  
+ For builds triggered by a pull request, it is `pr/pull-request-number`. 
+ For builds triggered by creating a new branch or pushing a commit to a branch, it is `branch/branch-name`. 
+ For builds triggered by a pushing a tag to a repository, it is `tag/tag-name`. 

HOME  
This environment variable is always set to `/root`.

AWS CodeBuild also supports a set of environment variables for self-hosted runner builds. To learn more about CodeBuild self-hosted runner, see [Tutorial: Configure a CodeBuild-hosted GitHub Actions runner](action-runner.md).

CODEBUILD\$1RUNNER\$1OWNER  
The owner of the repository that triggers the self-hosted runner build.

CODEBUILD\$1RUNNER\$1REPO  
The name of the repository that triggers the self-hosted runner build.

CODEBUILD\$1RUNNER\$1REPO\$1DOMAIN  
The domain of the repository that triggers the self-hosted runner build. Only specified GitHub Enterprise builds.

CODEBUILD\$1WEBHOOK\$1LABEL  
The label used to configure build overrides and the self-hosted runner during the build.

CODEBUILD\$1WEBHOOK\$1RUN\$1ID  
The run ID of the workflow associated with the build.

CODEBUILD\$1WEBHOOK\$1JOB\$1ID  
The job ID of the job associated with the build.

CODEBUILD\$1WEBHOOK\$1WORKFLOW\$1NAME  
The name of the workflow associated with the build if it exists in the webhook request payload.

CODEBUILD\$1RUNNER\$1WITH\$1BUILDSPEC  
If a buildspec override is configured in the self-hosted runner request labels, this is set to `true`.

You can also provide build environments with your own environment variables. For more information, see the following topics:
+ [Use CodeBuild with CodePipeline](how-to-create-pipeline.md)
+ [Create a build project](create-project.md)
+ [Change build project settings](change-project.md)
+ [Run builds manually](run-build.md)
+ [Buildspec reference](build-spec-ref.md)

To list all of the available environment variables in a build environment, you can run the `printenv` command (for Linux-based build environment) or `"Get-ChildItem Env:"` (for Windows-based build environments) during a build. Except for those previously listed, environment variables that start with `CODEBUILD_` are for CodeBuild internal use. They should not be used in your build commands.

**Important**  
We strongly discourage the use of environment variables to store sensitive values, especially AWS access key IDs. Environment variables can be displayed in plain text using tools such as the CodeBuild console and the AWS CLI.  
We recommend you store sensitive values in the Amazon EC2 Systems Manager Parameter Store and then retrieve them from your buildspec. To store sensitive values, see [Systems Manager Parameter Store](https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-paramstore.html) and [Walkthrough: Create and test a String parameter (console)](https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-paramstore-console.html) in the *Amazon EC2 Systems Manager User Guide*. To retrieve them, see the `parameter-store` mapping in [Buildspec syntax](build-spec-ref.md#build-spec-ref-syntax).

CODEBUILD\$1BUILD\$1URL  
The URL of the build results for this build.

# Background tasks in build environments
<a name="build-env-ref-background-tasks"></a>

You can run background tasks in build environments. To do this, in your buildspec, use the `nohup` command to run a command as a task in the background, even if the build process exits the shell. Use the **disown** command to forcibly stop a running background task.

**Examples:**
+ Start a background process and wait for it to complete later:

  ```
  |
  nohup sleep 30 & echo $! > pidfile
  …
  wait $(cat pidfile)
  ```
+  Start a background process and do not wait for it to ever complete:

  ```
  |
  nohup sleep 30 & disown $!
  ```
+  Start a background process and kill it later:

  ```
  |
  nohup sleep 30 & echo $! > pidfile
  …
  kill $(cat pidfile)
  ```