Run Command allows you to manage your fleet of EC2 instances remotely and securely, allowing you to perform maintenance and management without ever having to log into the instances. Much as we saw in the Automation section, Run Command also uses SSM documents to help you perform administrative tasks and configuration changes.
As an example, we will see how to update the SSM agent on an EC2 instance. The SSM agent is preinstalled with most versions of Linux and Windows, and its main purpose is to process requests from AWS Systems Manager. To update the SSM agent using Run Command, execute the following steps:
- From within the Systems Manager console, select Run Command from the Actions section:
- In the Command document list, search for AWS-UpdateSSMAgent:
- The Command parameters section is optional; you can specify a specific version of the agent you want to install, or if you want to downgrade to a previous agent:
- Next, you can select your target EC2 instances that...