AWS Certified DevOps Engineer – Professional (DOP-C02) — Question 255

A company uses the AWS Cloud Development Kit (AWS CDK) to define its application. The company uses a pipeline that consists of AWS CodePipeline and AWS CodeBuild to deploy the CDK application.

The company wants to introduce unit tests to the pipeline to test various infrastructure components. The company wants to ensure that a deployment proceeds if no unit tests result in a failure.

Which combination of steps will enforce the testing requirement in the pipeline? (Choose two.)

Answer options

Correct answer: A, D

Explanation

Option A is correct because it ensures that the tests are run before deployment, and setting the OnFailure phase property to ABORT allows the pipeline to proceed if tests pass. Option D is also correct as it involves creating a test that checks resource properties, which is a key aspect of validating infrastructure. The other options either do not fulfill the requirement of proceeding with deployment upon test success or do not pertain to unit testing.