AWS Certified Developer – Associate / Question #599 of 557

Question #599

A development team is configuring a continuous integration/continuous delivery (CI/CD) pipeline using AWS CodePipeline. The team needs a service to compile the source code and execute automated tests during the build stage. Which AWS service should the team use for this purpose?

A

AWS CodeDeploy

B

AWS CodeArtifact

C

AWS CodeBuild

D

AWS CodeStar

Explanation

AWS CodeBuild is a fully managed build service that compiles source code, runs tests, and produces deployable artifacts. It is explicitly designed for the build stage of a CI/CD pipeline.

- Why C is correct: CodeBuild automates compiling, testing, and packaging code, making it ideal for the build phase.
- Why others are incorrect:
- A. AWS CodeDeploy: Focuses on deploying applications to AWS services (e.g., EC2, Lambda), not building or testing.
- B. AWS CodeArtifact: A package management service for storing dependencies (e.g., npm, Maven), unrelated to building or testing code.
- D. AWS CodeStar: A project management tool for setting up CI/CD pipelines but does not directly handle building or testing.

Key Points: CodeBuild handles build and test phases, while CodeDeploy, CodeArtifact, and CodeStar address deployment, dependency management, and project setup, respectively.

Answer

The correct answer is: C