In the Demo, we will
AmazonSSMManagedInstanceCore
SSMInstanceRole
Systems-Manager-Demo
AWS-RunShellScript
echo "Hello from Systems Manager Run Command!"
#!/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}')"
config-parameter-1
/usr/app-folder/app-config.yaml
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