DOP-C02 Practice Question 63: CloudFormation Drift Detection
AWS Certified DevOps Engineer – Professional (DOP-C02) · Test 7 · question 3 of 10
An engineer suspects that someone manually changed a security group rule that was originally created by a CloudFormation stack, bypassing the stack's template. Which CloudFormation feature should the engineer use to confirm whether the live resource configuration has diverged from what the template defines?
Show answer and explanation
Answer:
Drift detection compares the current, actual configuration of a stack's resources against the expected configuration defined in the template and parameters, and reports each resource as IN_SYNC, MODIFIED, DELETED, or NOT_CHECKED. That is exactly what the engineer needs to confirm a manual out-of-band change. Change sets (option A) preview what would happen if the current template were updated with new parameters or a new template; they do not detect changes already made outside CloudFormation. Stack policies (option C) prevent specific update actions on resources during a stack update, but they do not compare live state to the template. Nested stacks (option D) are a way to compose stacks from other stacks and have nothing to do with detecting configuration drift.
Reference: Detecting unmanaged configuration changes to stacks and resources