AWS bootstrap scripts (user-data) to install AWS CLI and SSM agent
- Run commands on your Linux instance at launch
- https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/user-data.html
- Install AWS Systems Manager Agent (SSM Agent) on an Amazon EC2 Linux instance at launch
- https://aws.amazon.com/premiumsupport/knowledge-center/install-ssm-agent-ec2-linux/
- Installing, updating, and uninstalling the AWS CLI
- https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-install.html
This topic lists the commands to check whether AWS Systems Manager Agent (SSM Agent) is running on each supported operating system. It also provides the commands to start the agent if it isn't running.
Operating system | Command to check SSM Agent status | Command to start SSM Agent |
---|---|---|
Amazon Linux | sudo status amazon-ssm-agent |
sudo start amazon-ssm-agent |
Amazon Linux 2 and Amazon Linux 2023 | sudo systemctl status amazon-ssm-agent |
sudo systemctl enable amazon-ssm-agent sudo systemctl start amazon-ssm-agent |
CentOS 6.x | sudo status amazon-ssm-agent |
sudo start amazon-ssm-agent |
CentOS 7.x and CentOS 8.x | sudo systemctl status amazon-ssm-agent |
sudo systemctl enable amazon-ssm-agent sudo systemctl start amazon-ssm-agent |
Debian Server 8, 9, and 10 | sudo systemctl status amazon-ssm-agent |
sudo systemctl enable amazon-ssm-agent sudo systemctl start amazon-ssm-agent |
macOS | Check the agent log file at /var/log/amazon/ssm/amazon-ssm-agent.log | sudo launchctl load -w /Library/LaunchDaemons/com.amazon.aws.ssm.plist sudo launchctl start com.amazon.aws.ssm |
Oracle Linux | sudo systemctl status amazon-ssm-agent |
sudo systemctl enable amazon-ssm-agent sudo systemctl start amazon-ssm-agent |
Red Hat Enterprise Linux (RHEL) 6.x | sudo status amazon-ssm-agent |
sudo start amazon-ssm-agent |
Red Hat Enterprise Linux (RHEL) 7.x and 8.x | sudo systemctl status amazon-ssm-agent |
sudo systemctl enable amazon-ssm-agent sudo systemctl start amazon-ssm-agent |
SUSE Linux Enterprise Server (SLES) | sudo systemctl status amazon-ssm-agent |
sudo systemctl enable amazon-ssm-agent sudo systemctl start amazon-ssm-agent |
Ubuntu Server 14.04 (all) and 16.04 (32-bit) | sudo status amazon-ssm-agent |
sudo start amazon-ssm-agent |
Ubuntu Server 16.04 64-bit instances (deb package installation) | sudo systemctl status amazon-ssm-agent |
sudo systemctl enable amazon-ssm-agent sudo systemctl start amazon-ssm-agent |
Ubuntu Server 16.04, 18.04, and 20.04 LTS, 20.10 STR 64-bit, and 22.04 LTS (Snap package installation) | sudo systemctl status snap.amazon-ssm-agent.amazon-ssm-agent.service |
sudo snap start amazon-ssm-agent |
Windows Server | Run in PowerShell: Get-Service AmazonSSMAgent |
Run in PowerShell Administrator mode: Start-Service AmazonSSMAgent |
More info