Soru

Zorluk: OrtaAWS CloudFormation

A developer is managing an application infrastructure deployed using AWS CloudFormation. During a stack update, the update fails, and the stack enters the UPDATE_ROLLBACK_FAILED state because an IAM role resource defined in the template was manually deleted from the AWS account out-of-band. Which two actions should the developer take to resolve this issue and return the stack to a usable state? (Select TWO.)

  1. Manually recreate the IAM role with the exact same name and configuration that existed prior to the deletion, and then continue the update rollbackCevap
  2. Perform the ContinueUpdateRollback operation and list the deleted IAM role in the ResourcesToSkip parameterCevap
  3. C
    Modify the CloudFormation template to remove the IAM role, and then immediately call the UpdateStack API to apply the template changes to the stack
  4. D
    Perform a stack drift detection, and then select the 'Auto-Remediate' option in the AWS CloudFormation console to automatically recreate the deleted IAM role
  5. E
    Create a new parameter in AWS Systems Manager Parameter Store to store the IAM role properties, enable automatic rotation, and reference it via a dynamic reference in the stack

Cevap

To resolve the UPDATE_ROLLBACK_FAILED state caused by an out-of-band deletion, the developer must either manually recreate the IAM role with the same name and config before continuing the rollback, or execute the ContinueUpdateRollback operation while specifying the deleted IAM role in the ResourcesToSkip parameter.
The correct actions are to either recreate the deleted resource manually with the same name to allow the rollback process to interact with it, or skip the resource entirely using the ContinueUpdateRollback operation. Both approaches allow the stack to exit the UPDATE_ROLLBACK_FAILED state.

Adım Adım Çözüm

1
Identify the root cause of the rollback failure by inspecting the CloudFormation stack events.
The stack is confirmed to be in the UPDATE_ROLLBACK_FAILED state due to a missing IAM role resource that was deleted out-of-band.
Understanding why the rollback failed is necessary to choose the appropriate recovery strategy.
2
Resolve the rollback blockage by either manually recreating the deleted resource with the matching name or using ContinueUpdateRollback with the ResourcesToSkip parameter.
The stack successfully rolls back to the UPDATE_ROLLBACK_COMPLETE state.
The stack must be brought to a stable completed rollback state before any new update operations can be initiated.
3
Perform a stack update to synchronize any desired configuration changes or recreate resources within the template.
The stack is updated successfully to the UPDATE_COMPLETE state.
This ensures that all resources are correctly aligned with the CloudFormation template.

Anahtar Kavram

Handling CloudFormation stack update rollback failures caused by out-of-band resource deletion.
Bu soruyu puanla