We can install and configure AWS Systems Manager Agent (SSM Agent) an EC2 instance, an on-premises server, or a VM.
Here, at Bobcares, we assist our customers with several AWS queries as part of our AWS Support Services.
Today, let us see how to perform the installation of the SSM Agent.
Install SSM Agent on EC2 instance
By default, many Amazon Linux-based AMIs and Ubuntu servers have the SSM agent.
We manually install the SSM Agent from other versions of Linux AMIs. This includes non-base images such as Amazon Elastic Container Service (Amazon ECS) optimized AMIs.
We can install SSM Agent by adding user data to an Amazon EC2 Linux instance before the launch.
-
Install SSM Agent on Amazon Linux
Our Support Techs suggest following the below steps once we login to the Amazon Linux EC2 instance using an SSH client.
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
The installation of the agent is complete.
Now 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.
-
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
-
Install SSM Agent on Centos 7
Coming to Centos 7, we 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
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
Later, to automatically start the service on instance reboot or instance boot up, we use:
sudo systemctl enable amazon-ssm-agent
[Couldn’t complete any of the above? We are here to help you]
Conclusion
In short, we saw how our Support Techs perform the installation on three instances.
0 Comments