Is there a free way to schedule an AWS auto-shutdown?

Hi Everyone,

Does anyone know if there is an easy/free way to schedule an automatic shutdown of my aws instance after a period of idle time? I’m paranoid that I’m going to leave it running and run up a huge bill. I did a few searches but everything I found involved some sort of paid service. I noticed that Paperspace has that option but I can’t find anything similar on AWS.

Alternatively is there a way I could just schedule a cronjob that would shutdown the machine from within the instance?

Thanks,
Patrick

I think you can

You can use cloudwatch alarms on CPU utilization to make sure that youa re using your instance and then stop it based on the user specified time where the CPU utilization is less than a user specified number between 0-100

https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/UsingAlarmActions.html

Thank you Nell! - much appreciated - I’ll give that a try.

The standard shutdown command on linux schedules shutdown e.g. sudo shutdown -h +60