Drift Detection

What Drift Detection Reports and Why LocalStack Cannot Run It

Drift detection compares each supported resource's live configuration with the values that the template and parameters set explicitly; defaults you never wrote are not checked. IaC Goals changed booknest-books behind its stack's back, but on LocalStack 63,725 the check itself fails:

Asking LocalStack 4.13.1 for driftShell
cd ~/v5-ch7/booknest/infra
aws cloudformation deploy --stack-name booknest-catalog --template-file catalog.yaml >/dev/null
aws cloudformation detect-stack-drift --stack-name booknest-catalog 2>&1 | fold -s -w 90
Output
aws: [ERROR]: An error occurred (InternalFailure) when calling the DetectStackDrift
operation: Sorry, the DetectStackDrift operation on the cloudformation service is not
currently supported by LocalStack.

On AWS 24 (not run here), detect-stack-drift returns an ID for describe-stack-drift-detection-status, which reports the stack as IN_SYNC, DRIFTED or NOT_CHECKED; describe-stack-resource-drifts marks each resource IN_SYNC, MODIFIED, DELETED or NOT_CHECKED and lists PropertyDifferences with expected and actual values and a type of ADD, REMOVE or NOT_EQUAL. Drift is a report, not a repair: fix the template or the resource, since the next deploy compares templates and leaves drift alone.