A SysOps Administrator is updating an AWS CloudFormation stack that contains an Amazon RDS DB instance. The stack update fails due to a configuration mismatch, prompting CloudFormation to initiate a rollback. During the rollback, the stack transitions to the UPDATE_ROLLBACK_FAILED state because an Amazon EC2 subnet group associated with the DB instance was manually deleted outside of CloudFormation. Which action must the SysOps Administrator take to return the stack to a stable, manageable state?
- Execute the ContinueUpdateRollback operation, specify the DB instance as a resource to skip, and then manually recreate the database configuration.Answer
- BRun the UpdateStack operation with a modified template that removes the DB instance resource from the stack definition.
- CAdd the iam:PassRole permission to the administrator's policy for the CloudFormation service role to authorize the automatic recreation of the subnet group during rollback.
- DRun a drift detection operation on the stack, and then use the AWS CLI to trigger automatic remediation of the deleted subnet group.
Answer
Execute the ContinueUpdateRollback operation, specify the DB instance as a resource to skip, and then manually recreate the database configuration.
Executing the ContinueUpdateRollback operation and choosing to skip the DB instance allows CloudFormation to bypass the resource that is failing to rollback (due to the missing subnet group) and return the stack to a stable state (UPDATE_ROLLBACK_COMPLETE). Once the stack is stable, the administrator can manually recreate the deleted subnet group and synchronize the database configuration.
Step-by-Step Solution
Key Concept
Remediating a stack stuck in the UPDATE_ROLLBACK_FAILED state by using the ContinueUpdateRollback operation and skipping the failed resource.