DOP-C02 exam dumps

DOP-C02 practice question 6 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 6

Select 3

Your organization uses AWS CodePipeline to orchestrate a CI/CD workflow for deploying a serverless application to AWS Lambda. One of the requirements is to ensure the production deployment occurs only after manual approval. Additionally, the pipeline should automatically roll back the deployment if the updated Lambda function results in errors in the production environment. How can you implement this solution?

  1. A

    Add a Manual Approval action in the production stage of the pipeline.

  2. B

    Enable Automatic Rollback in the deployment configuration of the Lambda function.

  3. C

    Use an Amazon CloudWatch Alarm to monitor errors in Lambda and trigger a rollback if a threshold is breached.

  4. D

    Integrate AWS Step Functions to handle rollbacks and approvals within the pipeline.

  5. E

    Use AWS CodeDeploy for deploying the Lambda function and configure the CodePipeline to use it in the deployment stage.

Show answer and explanation

Correct answers: A, B, E

Explanation

To meet the requirements, you need to add a Manual Approval action in the production stage to enforce manual intervention and use AWS CodeDeploy with Automatic Rollback for handling Lambda deployments. CodeDeploy integrates seamlessly with CodePipeline and allows you to configure deployment strategies and rollbacks. While CloudWatch Alarms and Step Functions are powerful tools, they are not the best fit for this scenario given the native capabilities of CodePipeline and CodeDeploy.

  • A. Correct.

    Adding a Manual Approval action ensures that the production deployment will not proceed without explicit approval, fulfilling the requirement for manual intervention.

  • B. Correct.

    Enabling Automatic Rollback in the deployment configuration ensures that the deployment can automatically revert to the previous version if errors occur, addressing the rollback requirement.

  • C. Incorrect.

    While CloudWatch Alarms can monitor Lambda errors, they do not directly integrate with CodePipeline to automatically trigger rollbacks. This requires additional custom automation.

  • D. Incorrect.

    AWS Step Functions is not necessary for this use case as CodePipeline and AWS CodeDeploy natively support the required functionality (manual approval and rollback).

  • E. Correct.

    Using AWS CodeDeploy for deploying the Lambda function allows you to configure rollback and other deployment strategies, making it the correct deployment tool for this scenario.

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