Sub topic 13
Handling drift and updating the landing zone
This chapter assumes you have launched a landing zone, attached controls to OUs, and used the AWS CLI. It covers how Control Tower detects changes that break its configuration, how to repair them, and how to update the landing zone to a new version.
What drift is
Control Tower manages resources in your accounts through AWS CloudFormation, AWS Organizations and AWS Config. Drift is any change made outside Control Tower that conflicts with what it expects. Common causes:
- Moving an account out of a registered OU with the Organizations console or API.
- Editing or detaching an SCP that Control Tower created.
- Deleting or changing a Control Tower resource, such as an IAM role, a CloudTrail trail or a CloudFormation stack set instance.
- Changing the Log Archive or Audit account configuration directly.
Control Tower reports drift on the landing zone, on OUs, on accounts and on individual enabled controls.
Checking drift status
Fetch the landing zone and look at driftStatus, status, version and latestAvailableVersion.
aws controltower get-landing-zone \
--landing-zone-identifier <landing-zone-arn> \
--region us-east-1 \
--query 'landingZone.{status:status,drift:driftStatus.status,version:version,latest:latestAvailableVersion}'driftStatus.status is IN_SYNC or DRIFTED. For controls, list-enabled-controls returns a driftStatusSummary for each one.
aws controltower list-enabled-controls \
--target-identifier <ou-arn> \
--region us-east-1Repairing drift
The right repair depends on what drifted.
| Drift on | Typical repair |
|---|---|
| Landing zone | Run a repair or reset of the landing zone. |
| An OU or account | Re-register the OU, or update the account in Account Factory. |
| An enabled control | Reset the control. |
Resetting a control re-applies its configuration to the target:
aws controltower reset-enabled-control \
--enabled-control-identifier <enabled-control-arn> \
--region us-east-1Each of these calls returns an operation identifier. Poll it with get-control-operation (for controls) or get-landing-zone-operation (for the landing zone) until it reports success.
Updating the landing zone
AWS releases new landing zone versions with new features and fixes. When latestAvailableVersion is higher than version, an update is available. You can run it from the console, or pass a version and manifest to the API.
aws controltower update-landing-zone \
--landing-zone-identifier <landing-zone-arn> \
--landing-zone-version <new-version> \
--manifest file://manifest.json \
--region us-east-1The manifest holds your settings, such as governed Regions and logging retention. Changing governed Regions is also done through this update flow.
Before you update:
- Resolve existing drift. Updates can fail when the landing zone is already drifted.
- Confirm no other Control Tower operation is running. Operations run one at a time.
- Plan for time. Updates touch every enrolled account and OU, so they can take a long time in large organizations.
- After the update, update enrolled accounts if the console says they use an older baseline.
Exercise
Your landing zone shows DRIFTED and a new version is available. Should you start the update first? Why or why not?
Show answer
No. Resolve the drift first, because an update can fail on a drifted landing zone. Find the cause with get-landing-zone, repair it, confirm the status is IN_SYNC and the operation has finished, then run update-landing-zone.