Course menuDOP-C02

Exams / DOP-C02 / Troubleshooting failed deployments and stacks / Question 3

DOP-C02 practice question: Troubleshooting failed deployments and stacks (3 of 3)

Incident and Event Response A free question from our original DOP-C02 practice exam. Try it, then open the answer to see why each option is right or wrong.

Last verified against current AWS documentation ·How we write our questions

A logistics company updated an AWS CloudFormation stack that contains a Lambda function and an Application Load Balancer. The update also added an Amazon S3 bucket for shipping label images, and the application wrote labels to it before a later resource failed and CloudFormation began to roll back.

The rollback is now stuck in UPDATE_ROLLBACK_FAILED. The stack events show that the new bucket could not be deleted because it still holds objects. The bucket holds only label images that the application can regenerate on demand.

The team needs the stack to return to a stable, updatable state, and it does not want to delete the stack or its other resources.

Which action meets these requirements?

Choose one answer.

  1. A. Delete the stack with all of its resources, and then recreate it from the last working version of the template.
  2. B. Empty the bucket, and then run ContinueUpdateRollback on the stack so that the rollback finishes and the stack returns to UPDATE_ROLLBACK_COMPLETE.
  3. C. Edit the template to remove the bucket resource, and start a new update, so that CloudFormation skips the deletion and the rollback completes.
  4. D. Attach a stack policy that allows the Update:Delete action on the bucket, and retry the rollback, so that CloudFormation can remove the bucket together with its objects.
Show the answer and explanation

Answer: B

  • A. Wrong: Deleting the stack removes the load balancer and the function as well as the bucket, which the team wanted to keep. Recreating from the template is a larger change than the situation needs.
  • B. Right: Correct. CloudFormation can finish a stuck rollback once the resource that blocked it is cleared, and emptying the bucket removes the objects that prevented its deletion. The stack keeps its other resources and can be updated again. Learn more: Continue rolling back an update (opens in a new tab)
  • C. Wrong: A new update cannot run while the stack is in UPDATE_ROLLBACK_FAILED, and a template change does not remove the blocking objects. The team would still have a stack stuck in a failed state. Learn more: Continue rolling back an update (opens in a new tab)
  • D. Wrong: A stack policy controls which updates are allowed, and it does not delete the objects in a bucket. The bucket would still block the rollback. Learn more: Prevent updates to stack resources (opens in a new tab)

Explanation

A stack in UPDATE_ROLLBACK_FAILED needs the resource that blocked the rollback cleared before the rollback can finish. Emptying the bucket of regenerable objects and running ContinueUpdateRollback returns the stack to a stable state while keeping its other resources. Deleting the stack, editing the template and stack policies do not clear the blocker.

Study

Keep practicing

Answer questions with a score at the end, or practice just this topic with the explanation after each one. No sign-up needed.

Want more on Troubleshooting failed deployments and stacks? The 5 full-length practice sets have 11 more Troubleshooting failed deployments and stacks questions, 375 in all, none of them in the free exam. One payment of $14.99, no subscription. See the practice sets