How To Install AWS SSM Agent on Redhat RHEL-DecodingDevOps

How To Install AWS SSM Agent on Redhat-DecodingDevOps

AWS Systems Manager Agent (SSM Agent) is Amazon software that can be installed and configured on an Amazon 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.

by enabling or installing ssm agent to amazon linux servers you can connect aws servers from the browsers and you can monitor these servers from aws system manager. In the following steps i will show you how to install aws ssm agent on rhel or redaht servers

Before launching a ec2 instance in aws create a role for SSM. By attaching ssm role to ec2 instance, aws systems manger can identify the ec2 instance.

Create role for ssm

Login to to your aws console and go to iam and click on create role. Select EC2 service that will use this role.

install ssm agent on rhel

attach AmazonSSMFullAccess policy to this role and create the role.

create ssm role

 

give a name to your role and create the role

how to install ssm agent on rhel

Now we have successfully created the ssm role. Now we need to attach this role to every ec2 instance which you are going to lunch.

Install SSM Agent on Redhat or RHEL

launch ec2 instance and when you are launching ec2 instance attach ssm role which you created in previous steps and add below script in user data.

install ssm agent in redhat

Using below commands you can install ssm agent on redhat server or rhel machines.

#!/bin/bash
sudo yum install -y https://s3.amazonaws.com/ec2-downloads-windows/SSMAgent/latest/linux_amd64/amazon-ssm-agent.rpm
sudo systemctl enable amazon-ssm-agent
sudo systemctl start amazon-ssm-agent

Thats it we have successfully installed ssm agnet on rhel or redhat server. Now you can see ec2 instance in aws system manager and you can connect ec2 instance with aws session manager.

 

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *