You are currently viewing How To Auto Update AWS SSM Agent Using SSM State Manager

How To Auto Update AWS SSM Agent Using SSM State Manager

How To Auto Update AWS SSM Agent Using SSM State Manager

Hello Everyone

Welcome to CloudAffaire and this is Debjeet.

In the last blog post, we have discussed how to patch a Windows instance using AWS SSM Patch Manager.

In this blog post, we will discuss how to auto update AWS SSM agent using SSM state manager.

What Is AWS SSM State Manager:

AWS Systems Manager State Manager is a secure and scalable configuration management service that automates the process of keeping your Amazon EC2 and hybrid infrastructure in a state that you define. Using AWS SSM State Manager you can bootstrap instances with specific software at start-up, download and update agents on a defined schedule, including SSM Agent, configure network settings, join instances to a Windows domain (Windows Server instances only), patch instances with software updates throughout their lifecycle or run scripts on Linux and Windows managed instances throughout their lifecycle. State Manager integrates with AWS CloudTrail to provide a record of all executions that you can audit, and Amazon EventBridge to track state changes. You can also choose to store and view detailed command output in Amazon S3.

What Is AWS SSM State Manager Association:

A State Manager association is a configuration that is assigned to your managed instances. The configuration defines the state that you want to maintain on your instances. For example, an association can specify that antivirus software must be installed and running on your instances, or that certain ports must be closed. The association specifies a schedule for when the configuration is applied once or reapplied at specified times. The association also specifies actions to take when applying the configuration. For example, an association for antivirus software might run once a day. If the software is not installed, then State Manager installs it. If the software is installed, but the service is not running, then the association might instruct the State Manager to start the service.

How To Auto Update AWS SSM Agent Using SSM State Manager:


AWS CLI installed and configured. You can follow the below blog post to install and configure AWS CLI.

Step 1: Create an EC2 SSM Managed Instance.

Step 2: Create a new SSM state manager association to update SSM agent.

Step 3: Get SSM state manager association details.

Step 4: Get SSM state manager execution details.

Step 5: Cleanup.

Hope you have enjoyed this blog post, to get more details on AWS SSM, please refer below AWS documentation


Leave a Reply