DOP-C02 exam dumps

DOP-C02 practice question 395 of 411

AWS Certified DevOps Engineer - Professional. Professional level, Amazon Web Services. Free question with the correct answer and a full explanation.

DOP-C02 Question 395

Single answer

Your organization uses an AWS CodePipeline to automate CI/CD for a critical application. The deployment stage of the pipeline uses an AWS CodeDeploy deployment group to deploy an application to an Amazon EC2 Auto Scaling group. Recently, deployments have been failing frequently due to a misconfigured application environment. You need to implement a solution to ensure the deployment pipeline automatically halts and does not proceed to the next stage if a deployment fails. How should you configure the pipeline?

  1. A

    Enable rollback in the AWS CodeDeploy deployment group settings.

  2. B

    Add manual approval actions to the stages following the deployment stage.

  3. C

    Configure the deployment stage in the CodePipeline to detect deployment failures and stop the pipeline.

  4. D

    Use an Amazon CloudWatch alarm to monitor deployment failure metrics and manually stop the pipeline if needed.

Show answer and explanation

Correct answer: C

Explanation

The most appropriate solution is to configure the deployment stage in the CodePipeline to detect deployment failures and stop automatically if a failure occurs. AWS CodePipeline integrates with AWS CodeDeploy to monitor deployment status. By configuring the pipeline to detect failure signals from CodeDeploy, you ensure that subsequent stages do not proceed if the deployment does not succeed. This approach aligns with best practices for automated CI/CD pipelines and reduces the risk of propagating errors to production.

  • A. Incorrect.

    Enabling rollback in the AWS CodeDeploy deployment group settings helps restore the previous version of the application if a failure occurs, but it does not directly stop the pipeline or prevent it from proceeding to subsequent stages.

  • B. Incorrect.

    Adding manual approval actions can introduce a delay and require human intervention, but it does not ensure that the pipeline halts automatically in case of a deployment failure.

  • C. Correct.

    Configuring the deployment stage in the CodePipeline to detect deployment failures and stop the pipeline ensures that the pipeline halts automatically if a deployment fails, which is the most reliable and automated solution.

  • D. Incorrect.

    Using an Amazon CloudWatch alarm to monitor deployment failure metrics can alert you about failures, but manually stopping the pipeline is not an automated or efficient solution.

Timed practice exam

Take a DOP-C02 practice test under exam conditions

75 questions in 180 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam