- Manual console edits or API calls
- Other automation or deployment systems acting outside your template
- Upstream dependency or configuration changes

Exam tip: remember the common drift statuses —
IN_SYNC, MODIFIED, and DELETED. You may also encounter NOT_CHECKED for resource types or properties that CloudFormation cannot evaluate.
- Use a change set to roll the stack back to a known good state or to apply a controlled update.
- Update the CloudFormation template and reapply the stack to bring resources back into compliance.
- Manually update or replace resources when the change must be preserved and then update the template to reflect the desired state.

Stack policies block CloudFormation-driven updates only. If you need protection against manual console/API edits, combine stack policies with IAM restrictions, resource policies, AWS Config rules, or monitoring and automated remediation.

MyBucket. Use the logical resource ID from your template in the Resource field.
Stack policies provide a templated mechanism to prevent unintended CloudFormation-driven changes, improving infrastructure stability and security posture.

- Run drift detection regularly and include it in operational health checks or CI/CD pipelines.
- Integrate drift detection with monitoring and auditing tools such as AWS Config and AWS CloudTrail to track who changed what and when.
- Define and apply stack policies for critical resources to limit unintentional updates by CloudFormation.
- Avoid manual edits to managed infrastructure; if manual changes are required, ensure templates are updated immediately to reflect the new desired state.
- Automate remediation and notifications: use Amazon EventBridge to trigger Systems Manager Automation documents or other workflows when AWS Config or CloudTrail detect unauthorized changes.

- AWS CloudFormation console
- AWS CloudFormation drift detection
- AWS Config developer guide
- AWS CloudTrail user guide
- Amazon EventBridge developer guide
- AWS Systems Manager Automation