A developer manages a production environment deployed using an AWS CloudFormation stack. The stack contains an Amazon RDS DB instance, an Amazon EC2 instance, and an IAM role. A system administrator manually changed the security group of the RDS DB instance in the Amazon VPC Console to address a transient connection issue.
During a subsequent stack update to upgrade the database engine version and add policies to the IAM role, the update fails during the RDS DB instance modification. CloudFormation attempts to roll back the changes, but the rollback fails and remains stuck in the `UPDATE_ROLLBACK_FAILED` state because the manually modified security group configuration prevents the database rollback. The developer must complete the stack update, ensuring the new IAM policies are applied and the database is upgraded.
Which sequence of actions must the developer perform to resolve this issue?
- AExecute `aws cloudformation update-stack` with the `--force` parameter to override the rollback state and directly apply the upgraded database engine version and IAM policies. Then, run drift detection on the stack and select the auto-reconcile option to automatically revert the manual security group changes.
- Execute `aws cloudformation continue-update-rollback` specifying the logical ID of the RDS DB instance in the `--resources-to-skip` parameter to transition the stack to `UPDATE_ROLLBACK_COMPLETE`. Revert the manual security group modifications on the RDS DB instance in the Amazon VPC Console to align the resource's physical state with the template, and then perform a new stack update with the corrected database engine version and the updated IAM role template.Cevap
- CExecute `aws cloudformation rollback-stack` to force the stack state back to `ROLLBACK_COMPLETE`. Store the security group configuration as a secure string in AWS Systems Manager Parameter Store and reference it in the CloudFormation template using a dynamic reference, and then update the stack to apply the database and IAM role changes.
- DManually delete the RDS DB instance from the Amazon RDS Console to trigger an automatic stack state change to `DELETE_COMPLETE`. Run `aws cloudformation continue-update-rollback` to complete the stack rollback, and then re-create the RDS DB instance manually and perform a stack update with a new template that references the new database instance ID.