1
2
3
4
5
6
#!/bin/bash
wget https://s3.us-east-1.amazonaws.com/amazon-ssm-us-east-1/latest/debian_amd64/amazon-ssm-agent.deb -O /tmp/amazon-ssm-agent.deb
echo "scheduling /tmp/amazon-ssm-agent.deb"
echo "sudo dpkg -i /tmp/amazon-ssm-agent.deb" | at now +3 minutes
echo "sudo snap remove amazon-ssm-agent"
sudo snap remove amazon-ssm-agent 2>&1