A CodePipeline build stage must compile code with a proprietary toolchain packaged as a container image, download dependencies from a package repository reachable only inside a VPC, and run for up to 25 minutes. The team must not maintain build servers or expose the repository to the internet. Which build action meets these requirements?
Show the answer
Correct answerD. An AWS CodeBuild action whose project uses the VPC's private subnets and a custom build image stored in Amazon ECR.
AWhy not this: Lambda functions stop after 15 minutes, so a 25-minute build cannot finish.
BWhy not this: A public load balancer exposes the repository to the internet, and a managed image lacks the proprietary toolchain.
CWhy not this: CodeDeploy deploys revisions; running builds in its hooks means keeping a build instance running and patched.
DWhy this is right: CodeBuild runs managed builds inside the VPC to reach private resources and can use a custom image from Amazon ECR.
A CodeBuild project can run in a VPC's private subnets with a security group, so builds reach resources that exist only in the VPC, and it can use a custom build image from Amazon ECR that carries the toolchain. In private subnets it reaches the internet and AWS services through a NAT gateway or VPC endpoints. Lambda's 15-minute limit rules it out for a 25-minute build.