← AWS DevOps Engineer Professional: operations and delivery
03 / 24 · 70 MIN

IaC, drift, and reconciliation

Connect declared intent with observed state.

Concept and mechanism

Infrastructure as Code makes configuration intent versioned and reviewable. It does not eliminate differences between plan and execution. A CloudFormation change set helps inspect changes, replacements, and deletions before execution.

Current documentation includes predeployment checks such as property syntax, naming conflicts, and quotas, but the result still does not guarantee success of custom logic or every execution condition. Replacing a resource containing data deserves preservation, downtime, and recovery analysis.

The reviewer should understand service effects instead of approving merely because the change set was created.

Guided application

Drift detection also has scope. Not all resources and properties are supported; undeclared defaults may fall outside comparison. NOT_CHECKED does not mean compliance.

An IN_SYNC stack does not prove every actual setting was examined, and examining the parent stack does not automatically traverse nested stacks. After an authorized hotfix, compare intent with the correction that resolved the incident. Update the template or deliberately revert while preserving evidence.

In automation receiving a timeout after creation, check whether the resource already exists with the expected identity before retrying. This reconciliation reduces duplication when the previous outcome is uncertain.

Separate proposal, authority, and execution

Prepare an infrastructure review around three questions: what will change, under which authority, and how the outcome will be observed. A change set presents a proposal and can run predeployment validations for common failure causes. Execution can still fail through custom-resource logic or runtime conditions.

The stack service role deserves its own review: it remains associated with operations, and other users authorized to operate the stack can exercise it without having PassRole to associate it again. Restrict the role and allowed stack operations together.

Do not confuse an operator’s direct permissions with delegated stack authority, or an approved preview with successful execution. After a change is executed, other associated change sets no longer apply and are removed. A previously reviewed alternative needs a new proposal against the updated state and a new decision.

Demonstrate control scope

A Hook in WARN allows observation of violations without preventing the operation. If the requirement is prevention, validate transition to FAIL with representative cases. Confirm targets, actions, and invocation points: preDelete does not cover deletions during UpdateCleanup, including cleanup after replacement.

Use change-set review and complementary controls for uncovered scope. For CDK, inventory account/Region environments and required bootstrap resources before delivery. Successful local synthesis does not demonstrate remote preparation.

In the acceptance record, show what was rehearsed, what was excluded, who handles exceptions, and what evidence lets RUN maintain the control.

Exercise: accept evidence without overstating coverage

The local exercise represents a fictional internal acceptance rule: reviewed proposal, prepared environment, rehearsed prevention, declared coverage, and observed functional outcome. It does not simulate CloudFormation or determine whether a real stack is safe.

Change each field to identify missing evidence and write the corresponding acceptance condition. A WARN report can be useful during a pilot but does not alone satisfy a blocking requirement. Likewise, a technically completed execution may require application verification before handover.

Summarize the decision with concrete limits, connecting this lesson to data retention, state recovery, and resilience. Evidence should allow the process to be repeated for the next change.


# Original local acceptance checklist; not a CloudFormation evaluator.
def infrastructure_gaps(evidence):
    required = ("proposal_reviewed", "environment_prepared", "prevention_rehearsed",
                "coverage_declared", "functional_result_observed")
    return [name for name in required if evidence.get(name) is not True]

record = dict(proposal_reviewed=True, environment_prepared=True,
              prevention_rehearsed=False, coverage_declared=True,
              functional_result_observed=False)
assert infrastructure_gaps(record) == ["prevention_rehearsed", "functional_result_observed"]
record.update(prevention_rehearsed=True, functional_result_observed=True)
assert infrastructure_gaps(record) == []
assert len(infrastructure_gaps({})) == 5
# Empty gaps mean this exercise's evidence fields are present, not comprehensive compliance.
IN PRACTICE

A manual correction keeps production available, but the next release would restore the old value. Reconciliation is part of closure.

Common pitfalls

Preview as guarantee; IN_SYNC as universal coverage; blind retry after timeout; rollback reintroducing the incident.

Related topics: Fleet automation and governance · Capacity, resilience, and recovery

Take this idea with you

Explain checked scope and reconcile state with authorized intent.

Create account

References

AWS is a trademark of Amazon.com, Inc. or its affiliates. bigsavant.com is an independent preparation platform and is not affiliated with, associated with, sponsored, authorised or endorsed by AWS. Content and questions are original, are not official exam questions, and completing our tests does not award or guarantee any certification. Names are used only to identify the subject. All other trademarks belong to their respective owners.