A SysOps Administrator uses an AWS CloudFormation stack to manage an Amazon S3 bucket used for public asset hosting. A developer manually modified the bucket's CORS (Cross-Origin Resource Sharing) configuration directly in the Amazon S3 console to enable access for a new partner domain. The administrator runs drift detection on the stack and identifies that the S3 bucket is in a drifted state. The administrator wants to resolve the drift and align the stack and the S3 bucket configuration.
Which of the following actions can the administrator take to remediate the drift? (Select TWO.)
- Manually revert the CORS configuration on the S3 bucket to match the configuration specified in the CloudFormation template.Cevap
- Update the CloudFormation template to include the new CORS configuration, and then perform a stack update using the updated template.Cevap
- CExecute the `aws cloudformation resolve-drift` command with the S3 bucket's physical ID to automatically sync the bucket back to the template state.
- DPerform a 'Continue update rollback' operation on the stack to force the S3 bucket properties to revert to the template definitions.
- EAssociate an AWS Config rule with the stack that uses an automated Systems Manager remediation document to redeploy the stack template.
Cevap
The administrator can resolve the drift by manually reverting the S3 bucket's CORS configuration to match the template, or by updating the template to include the new CORS configuration and running a stack update.
The correct remediation steps are to either manually revert the CORS configuration on the S3 bucket to match the template definition, or to update the template to reflect the manual changes and run a stack update. These are the two standard ways to align drifted resources with the stack configuration in CloudFormation.
Adım Adım Çözüm
Anahtar Kavram
CloudFormation Drift Remediation
Tahmini Süre:1m 30s