A SysOps Administrator runs drift detection on an AWS CloudFormation stack and finds that the policy of an Amazon S3 bucket managed by the stack has been manually modified, placing the stack in a DRIFTED state. The administrator wants to align the bucket's configuration with the stack template. The administrator attempts to resolve this by initiating a stack update using the original, unmodified template and parameters. Which of the following describes the result of this operation?
- The stack update will fail to execute and return a validation error indicating that no updates are to be performed, leaving the drift unresolved.Cevap
- BThe stack update will complete successfully and automatically overwrite the drifted bucket policy to match the definition in the template.
- CThe stack update will run but fail during the update phase, triggering an automatic rollback that leaves the stack in the UPDATE_ROLLBACK_FAILED state.
- DThe stack update will complete successfully, and CloudFormation will update the template's metadata to accept the drifted configuration as the new baseline.
Cevap
The stack update will fail to execute and return a validation error indicating that no updates are to be performed, leaving the drift unresolved.
The correct answer is that the update will fail to execute with a validation error stating that no updates are to be performed. AWS CloudFormation evaluates stack updates based on changes to the template or parameters, not by comparing the template with the live state of the resources. When the template is identical, no update is triggered, leaving the drift in place.
Adım Adım Çözüm
Anahtar Kavram
CloudFormation Drift Remediation and Update Behavior