Why does AWS::CodeBuild::Project deployment fail with "CodeBuild currently doesn't support VPC in ..."?

0

I want to deploy a CodeBuild project with a build environment of compute type LINUX_GPU_CONTAINER.

This is the CDK code specifying the build environment:

    codebuild_image_repo = aws_ecr.Repository.from_repository_name(self, "my-codebuild-mirror", "codebuild/amazonlinux2-x86_64-standard")
    build_environment = aws_codebuild.BuildEnvironment(
        build_image=aws_codebuild.LinuxGpuBuildImage.from_ecr_repository(codebuild_image_repo, "4.0"),
        compute_type=codebuild.ComputeType.LARGE,
        privileged=True,
        )

The cdk deployment fails with

8:30:04 PM | UPDATE_FAILED        | AWS::CodeBuild::Project     | rjuenglinghfmcilum...ockerbuildC784821B
Failed to call UpdateProject, reason: CodeBuild currently doesn't support VPC in us-east-1a, please select subnets in other availability zones. (Service: AWSCodeBuild; Status Code:
400; Error Code: InvalidInputException; Request ID: e7894cde-5d45-4774-8862-9f070c95c8de; Proxy: null)

In the CodeBuild project I am specifying vpc, security_groups and subnet_selection. If in the code snippet above I use aws_codebuild.LinuxBuildImage instead of aws_codebuild.LinuxGpuBuildImage then the deployment succeeds.

The error message does not seem to point to the root cause because deployment succeeds with the same network setup if I change the compute type.

1개 답변
0
수락된 답변

reason: CodeBuild currently doesn't support VPC in us-east-1a, please select subnets in other availability zones

Did you try a different Availability Zone? Based on the message I'd infer that compute type LINUX_GPU_CONTAINER is not available in us-east-1a

--Syd

profile picture
Syd
답변함 일 년 전
  • Indeed, using a different subnet for the CodeBuild environment the error went away.

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠