AWS › AWS Systems Manager

How can Systems Manager State Manager ensure that instances remain in a consistently defined configuration state over time, even after reboots or scaling events?

Advanced

Answer

State Manager lets you define a desired configuration state, such as ensuring a specific security agent remains installed and running or that a particular configuration file always contains the correct settings, and continuously enforces that state on a defined schedule across your managed instances, automatically correcting any configuration drift that might otherwise occur due to manual changes, failed updates, or new instances launched by an Auto Scaling Group that were not part of the original golden image.
aws ssm create-association --name AWS-ConfigureAWSPackage --targets Key=tag:Environment,Values=Production --schedule-expression 'rate(1 day)'
Real-world example A company uses State Manager to continuously verify that a required security monitoring agent remains installed and running on every production instance, automatically reinstalling it if a manual change or a new Auto Scaling launched instance is ever found missing that required agent.

Common follow-ups: How does State Manager handle instances that fail to reach the desired state after several attempts?;What is the difference between State Manager and a full configuration management tool like Ansible?