Soru

Zorluk: KolayAWS CloudFormation Stack and Drift Management

A SysOps Administrator needs to verify whether a specific Amazon S3 bucket within a large AWS CloudFormation stack has undergone any manual configuration changes. To minimize execution time and resource overhead, the administrator wants to check only this specific resource rather than the entire stack. Which action should the administrator take to accomplish this?

  1. Run drift detection specifically for the Amazon S3 bucket resource within the CloudFormation console or using the AWS CLI.Cevap
  2. B
    Apply a temporary stack policy that denies drift detection on all resources except the S3 bucket, then perform stack-level drift detection.
  3. C
    Modify the stack's execution role to deny PassRole permissions on all resources except the S3 bucket, then perform stack-level drift detection.
  4. D
    Enable CloudWatch detailed monitoring on the stack to filter and identify configuration changes for the S3 bucket.

Cevap

Run drift detection specifically for the Amazon S3 bucket resource within the CloudFormation console or using the AWS CLI.
The correct option is to run drift detection specifically for the S3 bucket resource. AWS CloudFormation supports detecting drift on specific resources rather than the entire stack. This can be done via the CloudFormation console under the stack's resources tab, or by executing the 'aws cloudformation detect-stack-resource-drift' CLI command. This targeted check reduces execution time and focuses solely on the resource of interest.

Adım Adım Çözüm

1
Identify the target resource (the Amazon S3 bucket) and its physical ID within the AWS CloudFormation stack.
The target resource is isolated for drift checking.
This avoids scanning all other resources in the stack, reducing overhead.
2
Initiate drift detection for the specific resource using the console or the CLI command 'aws cloudformation detect-stack-resource-drift'.
CloudFormation compares the current configuration of the S3 bucket with its expected template configuration.
This provides a targeted drift status (e.g., IN_SYNC or MODIFIED) for only the selected resource.

Anahtar Kavram

CloudFormation Individual Resource Drift Detection
Tahmini Süre:45s
Bu soruyu puanla