Build environment compute types
Amazon CodeBuild provides build environments with the following available memory, vCPUs, and disk space:
Compute type | Environment computeType value | Environment type value | Memory | vCPUs | Disk space |
---|---|---|---|---|---|
ARM Small | BUILD_GENERAL1_SMALL |
ARM_CONTAINER |
4 GB | 2 | 50 GB |
ARM Large | BUILD_GENERAL1_LARGE |
ARM_CONTAINER |
16 GB | 8 | 50 GB |
Linux Small ¹ | BUILD_GENERAL1_SMALL |
LINUX_CONTAINER |
3 GB | 2 | 64 GB |
Linux Medium ¹ | BUILD_GENERAL1_MEDIUM |
LINUX_CONTAINER |
7 GB | 4 | 128 GB |
Linux Large ¹ | BUILD_GENERAL1_LARGE |
LINUX_CONTAINER |
15 GB | 8 | 128 GB |
Linux 2XLarge | BUILD_GENERAL1_2XLARGE |
LINUX_CONTAINER |
145 GB | 72 | 824 GB (SSD) |
Linux GPU Small | BUILD_GENERAL1_SMALL |
LINUX_GPU_CONTAINER |
16 GB | 4 | 220 GB |
Linux GPU Large | BUILD_GENERAL1_LARGE |
LINUX_GPU_CONTAINER |
255 GB | 32 | 50 GB |
Windows Medium | BUILD_GENERAL1_MEDIUM |
WINDOWS_SERVER_2019_CONTAINER |
7 GB | 4 | 128 GB |
Windows Large | BUILD_GENERAL1_LARGE |
WINDOWS_SERVER_2019_CONTAINER |
15 GB | 8 | 128 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/amazonlinux2-x86_64-standard:3.0
instead of a more
granular version, such as aws/codebuild/amazonlinux2-x86_64-standard:3.0-1.0.0
.
When using other environment types, it is recommended that you use a custom 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) or Change a build project's settings (console).
-
For the Amazon CLI, run the
create-project
orupdate-project
command, specifying thecomputeType
value of theenvironment
object. For more information, see Create a build project (Amazon CLI) or Change a build project's settings (Amazon CLI). -
For the Amazon SDKs, call the equivalent of the
CreateProject
orUpdateProject
operation for your target programming language, specifying the equivalent ofcomputeType
value of theenvironment
object. For more information, see the Amazon SDKs and tools reference.
Some environment and compute types have Region availability limitations:
-
The environment type
LINUX_GPU_CONTAINER
is only available in these Regions:-
US East (N. Virginia)
-
US West (Oregon)
-
Asia Pacific (Seoul)
-
Asia Pacific (Singapore)
-
Asia Pacific (Sydney)
-
Asia Pacific (Tokyo)
-
Canada (Central)
-
China (Beijing)
-
China (Ningxia)
-
Europe (Frankfurt)
-
Europe (Ireland)
-
Europe (London)
-
-
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 (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 (Stockholm)
-
Middle East (Bahrain)
-
South America (São Paulo)
-
-
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 (Hong Kong)
-
Asia Pacific (Jakarta)
-
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 (Stockholm)
-
Middle East (Bahrain)
-
Middle East (UAE)
-
South America (São Paulo)
-
For the compute type BUILD_GENERAL1_2XLARGE
, Docker images up to 100 GB
uncompressed are supported.
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
command.REPOSITORY
:TAG
You can use Amazon EFS to access more space in your build container. For more information, see Amazon Elastic File System sample for Amazon CodeBuild. If you want to manipulate container disk space during a build, then the build must run in privileged mode.
By default, Docker containers
do not allow access to any devices. Privileged mode grants a build project's Docker container access to all devices. For more information, see
Runtime Privilege and
Linux Capabilities