DVA-C02 Question 259
Single answerYou are working on an application deployed using AWS CodePipeline. As part of automating deployment testing, you want to ensure that integration tests are executed automatically after your application is deployed to a staging environment. Which AWS service integration should you use within your CodePipeline to achieve this?
- A
AWS CodeBuild
- B
AWS Lambda
- C
AWS CloudFormation
- D
AWS CodeDeploy
Show answer and explanation
Correct answer: A
Explanation
To automate deployment testing in AWS CodePipeline, AWS CodeBuild is the appropriate service to use. CodeBuild is designed to execute build and test steps, including integration tests, as part of the CI/CD pipeline. Other services like Lambda, CloudFormation, and CodeDeploy serve different purposes and are not suitable for running automated tests in this context.
- A. Correct.
AWS CodeBuild can be used to run build and test phases in a CI/CD pipeline. It is the correct service for running your integration tests as part of CodePipeline.
- B. Incorrect.
AWS Lambda can execute custom logic or scripts, but it is not designed to directly run build or test processes for an application. It is not the best fit for this scenario.
- C. Incorrect.
AWS CloudFormation is used for provisioning infrastructure as code, not for running tests in a deployment pipeline.
- D. Incorrect.
AWS CodeDeploy is used for managing application deployments to compute services like EC2 or Lambda, but it does not handle running test cases in a CI/CD pipeline.