Soru

Zorluk: ZorAWS CloudFormation

A developer is managing a production web application deployed via an AWS CloudFormation stack. The stack consists of an Amazon RDS DB instance, an Amazon EC2 Auto Scaling group, and an IAM role associated with the EC2 instances. To troubleshoot a connection issue, an administrator manually modified the EC2 security group rules and deleted the IAM role directly in the AWS Management Console. During a subsequent stack update to upgrade the database instance class, the update failed and the stack is now in the UPDATE_ROLLBACK_FAILED state. Which two actions should the developer take to resolve the stack status and reconcile the resource configurations? (Select TWO.)

  1. Manually recreate the deleted IAM role using the exact name and configuration it had prior to deletion, and then initiate the continue-update-rollback action.Cevap
  2. Execute the continue-update-rollback command and specify the logical ID of the deleted IAM role in the resources-to-skip parameter.Cevap
  3. C
    Perform a drift detection on the stack and use the CloudFormation drift resolution console to automatically import the manual security group modifications into the template.
  4. D
    Initiate a new stack update using the update-stack command with a modified template to bypass the rollback phase and force the database upgrade.
  5. E
    Store the updated security group configurations in the Systems Manager Parameter Store and use a dynamic reference to force stack synchronization.

Cevap

To resolve the UPDATE_ROLLBACK_FAILED state, the developer should either manually recreate the deleted IAM role and continue the rollback, or execute continue-update-rollback while skipping the deleted IAM role.
The correct options identify the two supported methods for resolving a stack stuck in the UPDATE_ROLLBACK_FAILED state. Recreating the deleted IAM role allows CloudFormation to find and delete/modify it during the rollback phase, which enables the rollback to complete successfully. Alternatively, calling the continue-update-rollback command and choosing to skip the deleted IAM role permits the rollback operation to skip that specific resource and successfully transition the stack to the UPDATE_ROLLBACK_COMPLETE state.

Adım Adım Çözüm

1
Analyze the stack status and event logs to identify the exact resource causing the rollback failure.
The logs indicate that the rollback failed because the IAM role referenced in the stack template was not found.
Before resolving the rollback failure, the root cause of the failure must be identified.
2
Choose to either restore the missing dependency or skip the resource during rollback.
Recreating the role allows the rollback to clean it up or update it normally. Alternatively, skipping the role allows the rollback to finish while leaving the resource state as-is.
CloudFormation requires either finding the resource to modify or delete it, or being explicitly told to skip it to complete the rollback sequence.
3
Perform a drift detection after the stack reaches a stable state to identify the out-of-band security group changes.
The drift detection report details the exact differences between the template and the actual security group rules.
This identifies all manual out-of-band changes that need to be reconciled manually or by updating the template.

Anahtar Kavram

CloudFormation Stack Rollback Failure Resolution
Bu soruyu puanla