Script used to send a relative uptime value of an AWS EC2 instance to AWS cloudwatch. Cloudwatch then can trigger action based on uptime (like stop, reboot, etc).
see https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UsingAlarmActions.html
$ go build .
$ sudo mv ./uptime-monitor /usr/local/bin
$ uptime-monitor
$ uptime-monitor reset
- refactor to parameterize ec2 instance ID