A developer is configuring AWS CodePipeline for deployment. The source code is in a GitHub repo and the pipeline's source stage is already set to that repo and branch. The developer wants the repository package's unit tests to run in the pipeline environment. Which steps will achieve this with the LEAST overhead? (Choose two.)
Choose an answer
Tap an option to check your answer.
Correct answer: Create an AWS CodeBuild project and add the package build and test commands to its buildspec., Add a new stage after the source stage, add an action that references the newly created project, and specify the source artifact as that action's input artifact..
Why this is the answer
To run unit tests in a CodePipeline, you need a build service. AWS CodeBuild is specifically designed for compiling source code, running tests, and producing deployable artifacts, making it the ideal choice for this scenario with the least overhead. CodeCommit is a source control service, not a build service. CodeDeploy is for deploying applications, not building or testing them. After creating the CodeBuild project, you must integrate it into the CodePipeline. This is done by adding a new stage after the source stage. This new stage will contain an action that invokes the CodeBuild project, using the output of the source stage (your repository content) as its input artifact. Adding an action to the source stage itself is incorrect as the source stage is only for retrieving the code.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed