DOP-C02 exam dumps

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

Single answer

Your organization has implemented a CI/CD pipeline using AWS CodePipeline that deploys a serverless application on AWS Lambda. As part of the deployment process, the pipeline provisions resources using AWS CloudFormation. Recently, the deployments have started failing intermittently due to a resource conflict in one of the stacks. What is the best approach to ensure the pipeline handles such conflicts gracefully and completes successfully?

  1. A

    Enable the 'Retain' deletion policy for the conflicting resources in the CloudFormation template.

  2. B

    Configure the CloudFormation action in CodePipeline to use the 'CREATE_UPDATE' change set type.

  3. C

    Set the CloudFormation stack policy to protect the conflicting resources during updates.

  4. D

    Configure the CloudFormation action in CodePipeline to automatically retry failed stack updates.

Show answer and explanation

Correct answer: C

Explanation

Resource conflicts in AWS CloudFormation can often occur due to unintentional updates to critical resources. By setting a stack policy, you can protect specific resources from being updated during a stack update operation. This ensures that the deployment continues smoothly without interference from resource conflicts. Other options either do not address the root cause of the issue or are not applicable in this scenario.

  • A. Incorrect.

    Enabling the 'Retain' deletion policy would retain the resource when the stack is deleted, but it does not address resource conflicts during stack updates.

  • B. Incorrect.

    Using the 'CREATE_UPDATE' change set type only allows you to preview changes before applying them, but it doesn’t resolve resource conflicts automatically.

  • C. Correct.

    Setting a stack policy for CloudFormation allows you to protect specific resources during stack updates, preventing conflicts from affecting the deployment process.

  • D. Incorrect.

    Automatically retrying failed stack updates is not a feature of CodePipeline, and manual intervention is usually required for such failures.

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