AWS Certified Developer – Associate (DVA-C02) — Question 105
A developer is configuring an application's deployment environment in AWS CodePipeline. The application code is stored in a GitHub repository. The developer wants to ensure that the repository package's unit tests run in the new deployment environment. The developer has already set the pipeline's source provider to GitHub and has specified the repository and branch to use in the deployment.
Which combination of steps should the developer take next to meet these requirements with the LEAST overhead? (Choose two.)
Answer options
- A. Create an AWS CodeCommit project. Add the repository package's build and test commands to the project's buildspec.
- B. Create an AWS CodeBuild project. Add the repository package's build and test commands to the project's buildspec.
- C. Create an AWS CodeDeploy project. Add the repository package's build and test commands to the project's buildspec.
- D. Add an action to the source stage. Specify the newly created project as the action provider. Specify the build artifact as the action's input artifact.
- E. Add a new stage to the pipeline after the source stage. Add an action to the new stage. Specify the newly created project as the action provider. Specify the source artifact as the action's input artifact.
Correct answer: B, E
Explanation
The correct answer is B and E. By creating an AWS CodeBuild project, the developer can specify the build and test commands in the buildspec, allowing unit tests to run efficiently. Adding a new stage in the pipeline allows for the integration of this project, ensuring the source artifact is utilized for the build process. Options A and C involve using CodeCommit and CodeDeploy, which are not necessary for running unit tests in this scenario.