Install SSM Agent on EC2 instance and Configure it








AWS Systems Manager Agent (SSM Agent) is Amazon software that can be installed and configured on an EC2 instance, an on-premises server, or a virtual machine (VM). SSM Agent makes it possible for Systems Manager to update, manage, and configure these resources. The agent processes requests from the Systems Manager service in the AWS Cloud, and then runs them as specified in the request.

Here at Ibmi Media, as part of our Server Management Services, we regularly help our Customers to perform related AWS queries.

In this context, we shall look into how to perform the installation of the SSM Agent.


How to Install SSM Agent on Amazon Linux ?

You can do the below steps once we login to the Amazon Linux EC2 instance using an SSH client.

To begin, we download the SSM agent and run the agent installer:

$ sudo yum install -y https://s3.amazonaws.com/ec2-downloads-windows/SSMAgent/latest/linux_amd64/amazon-ssm-agent.rpm

Next, we need to start the SSM agent. To do so, we run:

$ sudo start amazon-ssm-agent

Eventually, we check the status of the Amazon SSM Agent:

$ sudo status amazon-ssm-agent

The output will show us that it is up and running.


How to Install SSM Agent on Amazon Linux 2 ?

Here again, we log in to Amazon Linux 2 EC2 instance using an SSH client.

Then we download the SSM agent and run the agent installer:

$ sudo yum install -y https://s3.amazonaws.com/ec2-downloads-windows/SSMAgent/latest/linux_amd64/amazon-ssm-agent.rpm

We need to start the amazon-ssm-agent service. For that, we run the command below:

$ sudo systemctl start amazon-ssm-agent

Then we check the status of the SSM agent:

$ sudo systemctl status amazon-ssm-agent

Eventually, we enable the amazon-ssm-agent service to start on system reboot or boot up:

$ sudo systemctl enable amazon-ssm-agent


How to Install SSM Agent on Centos?

Here, we will log in to the Centos EC2 instance using an SSH client. Then we follow the steps below:

Initially, we download the SSM agent and run the agent installer:

$ sudo yum install -y https://s3.amazonaws.com/ec2-downloads-windows/SSMAgent/latest/linux_amd64/amazon-ssm-agent.rpm

Then, we run the below command to start the amazon-ssm-agent service on the Centos Linux Instance:

$ sudo systemctl start amazon-ssm-agent

Then to check the status of the SSM agent, we run:

$ sudo systemctl status amazon-ssm-agent

Finally, to automatically start the service on instance reboot or instance boot up, we use:

$ sudo systemctl enable amazon-ssm-agent


[Need assistance in fixing Aws errors ? We can help you. ]



Conclusion

This article covers what Amazon SSM is about and methods to install SSM Agent on EC2 Linux instances. In fact, AWS Systems Manager Agent (SSM Agent) processes Systems Manager requests and configures your machine as specified in the request. 


For Linux Tutorials

We create Linux HowTos and Tutorials for Sys Admins. Visit us on LinuxAPT.com

Also for Tech related tips, Visit forum.outsourcepath.com or General Technical tips on www.outsourcepath.com