-
Notifications
You must be signed in to change notification settings - Fork 4.5k
(software.amazon.awscdk.services.codebuild): CodeBuild ARM (aarch64) images/architecture is not fully supported by CDK #18916
Description
What is the problem?
CodeBuild module does not support using arch 64 images due to missing ComputeType enum options. You can observe the aarch64 compute options are different than the default linux options in the console, but there doesn't seem to be a way to set to one in CDK.
Reproduction Steps
Create a CodeBuild project in a stack like this:
Repository repo = Repository.Builder.create(this, "Repository")
.description("description")
.repositoryName("repositoryName")
.build();
CodeCommitSourceProps props = CodeCommitSourceProps.builder()
.branchOrRef("dev")
.repository(repo)
.build();
ISource source = Source.codeCommit(props);
BuildEnvironment env = BuildEnvironment.builder()
.buildImage(LinuxBuildImage.fromCodeBuildImageId("aws/codebuild/amazonlinux2-aarch64-standard:2.0"))
.computeType(ComputeType.MEDIUM) // NOTE: No ComputeType will deploy successfully
.build();
Project buildProject = Project.Builder.create(this, "BuildProject")
.description("description")
.environment(env)
.projectName("projectName")
.source(source)
.build();What did you expect to happen?
Stack deploys successfully.
What actually happened?
AWS CodeBuild curated image aws/codebuild/amazonlinux2-aarch64-standard:2.0 is not supported for projects with environment type LINUX_CONTAINER and compute type BUILD_GENERAL1_SMALL (Service: AWSCodeBuild; Status Code: 400; Error Code: InvalidInputException; Request ID: fce423e8-0d42-472e-9733-816b8055778c; Proxy: null)
CDK CLI Version
2.12.0 (build c9786db)
Framework Version
No response
Node.js Version
v16.10.0
OS
MacOS 12.2
Language
Java
Language Version
Java (8)
Other information
Even when omitting the compute type, the default value prevents deployment.