INFRASTRUCTURE LEARNINGINFRASTRUCTURE LEARNING
インフラ大全インフラ大全IT INFRASTRUCTURE / LEARNING
Infrastructure learning guide
Find a lesson or lab/

Esc to close · Search terms stay on your device

LEARNING日本語

Topic lessonTopic: IaC and CloudFormation: configuration, changes and drift

CloudFormation drift detection: IN_SYNC, NOT_CHECKED and coverage

Drift is a difference between configuration expected by CloudFormation and the actual resource configuration. Finishing a check, finding matching properties and proving everything safe are different claims. Read status, coverage and observation time together using three synthetic resources.

What you will learn

Distinguish operation, resource and stack statuses; explain coverage limits involving unchecked resources, properties, nested stacks and observation times.

Prerequisite

A template defines the expected configuration; a stack manages resources together. Settings can also be changed manually. The records below are teaching examples, not observations from AWS.

Separate operation, resource and stack status

Identify what each status describes
LevelTypical statusesHow to read it
Detection operationDETECTION_IN_PROGRESS / DETECTION_COMPLETE / DETECTION_FAILEDWhether detection is running, completed for supported resources, or encountered failure.
ResourceIN_SYNC / MODIFIED / DELETED / NOT_CHECKEDMatching, modified or deleted configuration, or not checked.
StackIN_SYNC / DRIFTED / NOT_CHECKEDAggregate result for supported resources, or not checked.

Fixed example: a completed operation can include drift and unchecked resources

Conceptual record of three resources in one investigation
ResourceSupport and check conditionResultConclusion
ASupported and compared.IN_SYNCThe checked configuration matches.
BSupported; a difference was found.MODIFIEDInspect expected versus actual values.
CUnsupported in this example.Not checkedA match has not been established.
Separate completion from per-resource findings
Separate completion from per-resource findings1: Detection operation — Inspect findings — Resource findings. 2: Resource findings — Aggregate with scope — Overall interpretation12Detection operationResource findingsOverallinterpretationSeparate completion from per-resource findings1: Detection operation — Inspect findings — Resource findings. 2: Resource findings — Aggregate with scope — Overall interpretation12DetectionoperationResourcefindingsOverallinterpretation
  1. Detection operation → Resource findingsInspect findings
  2. Resource findings → Overall interpretationAggregate with scope
Detection operation
Checks supported A and B
Resource findings
A matches; B differs; C unchecked
Overall interpretation
DRIFTED; C remains unchecked

The operation can be DETECTION_COMPLETE after successfully checking A and B, while the stack is DRIFTED because B differs. C has not been checked. This is a conceptual table, not a literal API response.

Check what IN_SYNC leaves outside the comparison

Detection is limited to supported resources and comparable properties. Distinguish explicitly defined values from service defaults. Checking a parent stack does not inspect the contents of its nested stacks.

Record coverage alongside the result
Coverage detailQuestion
ResourcesWhich were in scope? Separate unsupported, failed and excluded items.
PropertiesWere important values explicit and comparable?
Related stacksAre there nested stacks or attachments from other stacks?
TimeDo these results belong to the current check? Inspect per-resource timestamps too.

Do not treat failed checks or stale results as matches

DETECTION_FAILED means at least part of the operation failed. Successfully checked resources may still have results, but failed coverage remains unresolved. An empty list does not prove there is no difference; investigate read permissions and retrieval failures.

Match the stack, logical and physical resource IDs, and timestamps. An individual-resource check can affect the stack-level display; that does not establish that every resource was rechecked at the same time.

Detection is not repair: reconcile with intent

When a difference is found, establish why it exists. Blindly restoring an old definition can undo a necessary incident fix. Decide whether to update the definition or change the resource, including ownership and impact in the review.

Where supported, a drift-aware change set can preview differences involving actual state. Unsupported types and unreadable properties still limit coverage. Detection or preview creation does not itself repair resources or restore an application.

Practice reading status together with coverage

Choose an option to see the result and explanation.

In the fixed example, A is IN_SYNC and B is MODIFIED; detection is complete. What is the stack result?
Read the answer and reason

Answer: DRIFTED because B differs · A drifted supported resource means the stack is DRIFTED even if detection completed.

How should unsupported resource C be reported?
Read the answer and reason

Answer: Unchecked; a match has not been established · Unsupported coverage or omitted results are not evidence of a match.

A stack with zero supported resources is IN_SYNC. What can you conclude?
Read the answer and reason

Answer: It does not prove every resource matches; inspect coverage separately · Report the status with its coverage and retain the need for separate checks.

Detection failed, but a result for A is available. How should you handle it?
Read the answer and reason

Answer: Use A’s result and record failed coverage as unresolved · Distinguish valid partial findings from targets that could not be inspected.

Only the parent stack was checked. Were the nested stack contents also checked?
Read the answer and reason

Answer: No; separately verify checks of the relevant nested stacks · Inspect targets and results at each level, retaining unchecked coverage.

A difference was found. Should you immediately restore the old definition?
Read the answer and reason

Answer: Review the reason, owner and impact, then choose the desired state and remedy · Establish the intended state and review changes and execution conditions before applying a remedy.

Check, then explain in your own words

  1. Distinguish operation, resource and stack statuses.
  2. Explain how completed detection and DRIFTED can coexist.
  3. Record unchecked coverage and decisions needed before repair.
Check your understanding: What should accompany an IN_SYNC report?

Include resources and properties checked, unsupported or failed coverage, nested-stack scope and result timestamps.

A match is limited to the observed scope and time; it does not guarantee overall application or security health.

Sources and conditions checked

The official references used in this lesson are collected here with their scope, conditions and corresponding sections. Independent expert review and live AWS comparison have not been performed.