AWS Certified Developer – Associate — Question 349
A company set up a continuous build process that uses AWS CodeBuild and AWS CodeCommit. During the development phase, developers are frequently pushing code and causing significant build failures. The company wants a solution that will build code before the developers push the code to the main branch.
Which solution meets these requirements MOST cost-effectively?
Answer options
- A. Configure an Amazon EC2 instance with the CodeBuild agent to build the code.
- B. Configure CodeBuild jobs on AWS for each branch build process.
- C. Configure the CodeBuild agent to build the code in the local system.
- D. Configure a Jenkins plugin for CodeBuild to run the code build process.
Correct answer: B
Explanation
Configuring CodeBuild to run builds for each feature branch or pull request ensures that code is automatically tested and validated before being merged into the main branch, leveraging AWS's fully managed and cost-effective pay-as-you-go model. Implementing EC2 instances or Jenkins servers increases operational overhead and infrastructure costs unnecessarily. Running CodeBuild locally does not provide a centralized, automated gatekeeping mechanism to protect the main branch.