AWS Systems Manager
Hands-On
Demo
Agenda
In the Demo, we will
- Create an EC2 Instance Profile Role for Systems Manager
- Create an EC2 Instance
- Run Systems Manager Run Command
- Explore all the Different Features offered by Systems Manager
Create Systems Manager Role for EC2
Create IAM role
AmazonSSMManagedInstanceCore
Add permissions
SSMInstanceRole
Name
Create role
Create an EC2 Instance
Systems-Manager-Demo
Assign Instance Profile Role
AWS Systems Manager Run Command
AWS-RunShellScript
Target selection
echo "Hello from Systems Manager Run Command!"
Run
Command Status
View output
#!/bin/bash
echo "Hostname: $(hostname)"
echo "Operating System: $(cat /etc/os-release | grep PRETTY_NAME | cut -d'"' -f2)"
echo "CPU Info: $(lscpu | grep 'Model name' | cut -d':' -f2 | xargs)"
echo "Total Memory: $(free -h | awk '/^Mem:/ {print $2}')"
echo "Disk Usage: $(df -h / | awk 'NR==2 {print $5}')"
Another Command
Target selection
Command status
Command Output
Automation
Fleet Manager
Start terminal sension
Run Interactive command
Parameter Store
config-parameter-1
/usr/app-folder/app-config.yaml
Inventory
State Manager
sudo systemctl status amazon-ssm-agent
sudo systemctl stop amazon-ssm-agent
sudo yum remove amazon-ssm-agent
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
sudo systemctl status amazon-ssm-agent
Install SSM Agent
Clean Up
- Delete the EC2 Instance
- Delete the EC2 Instance Profile Role
- Delete the Systems Manager Parameter Store Parameter
🙏
Thanks
for
Watching
AWS Systems Manager - Hands-On Demo
By Deepak Dubey
AWS Systems Manager - Hands-On Demo
AWS Systems Manager - Hands-On Demo
- 92