Runtime versions - Amazon CodeBuild
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Runtime versions

When you specify a runtime in the 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.

Ubuntu and Amazon Linux 2 platform runtime versions
Runtime name Version Specific version Specific major and latest minor version Latest version
android

28

android: 28

android: 28.x

android: latest

29

android: 29

android: 29.x

dotnet

3.1

dotnet: 3.1

dotnet: 3.x

dotnet: latest

5.0

dotnet: 5.0

dotnet: 5.x

6.0

dotnet: 6.0

dotnet: 6.x

8.0

dotnet: 8.0

dotnet: 8.x

golang

1.12

golang: 1.12

golang: 1.x

golang: latest

1.13

golang: 1.13

1.14

golang: 1.14

1.15

golang: 1.15

1.16

golang: 1.16

1.18

golang: 1.18

1.20

golang: 1.20

1.21

golang: 1.21

java

corretto8

java: corretto8

java: corretto8.x

java: latest

corretto11

java: corretto11

java: corretto11.x

corretto17

java: corretto17

java: corretto17.x

corretto21

java: corretto21

java: corretto21.x

nodejs

10

nodejs: 10

nodejs: 10.x

nodejs: latest

12

nodejs: 12

nodejs: 12.x

14

nodejs: 14

nodejs: 14.x

16

nodejs: 16

nodejs: 16.x

18

nodejs: 18

nodejs: 18.x

20

nodejs: 20

nodejs: 20.x

php

7.3

php: 7.3

php: 7.x

php: latest

7.4

php: 7.4

8.0

php: 8.0

php: 8.x

8.1

php: 8.1

8.2

php: 8.2

8.3

php: 8.3

python

3.7

python: 3.7

python: 3.x

python: latest

3.8

python: 3.8

3.9

python: 3.9

3.10

python: 3.10

3.11

python: 3.11

3.12

python: 3.12

ruby

2.6

ruby: 2.6

ruby: 2.x

ruby: latest

2.7

ruby: 2.7

3.1

ruby: 3.1

ruby: 3.x

3.2

ruby: 3.2

You can use a build specification to install other components (for example, the Amazon CLI, Apache Maven, Apache Ant, Mocha, RSpec, or similar) during the install build phase. For more information, see Buildspec example.