AndyJarrett

Auto stop and start an Amazon EC2 instance

At my company we run several EC2 instance which don't need to operate 24/7 such as Dev and Staging and I recently figured there is no need to have them up if they are not being used. Another bonus is that if I can shut these down for at least 6 hours a day (1am - 7pm as some Devs do odd hours) that gives me a cost reduction of 25%. If fact most companies could even save themselve 50% if they could shut down a dev box for 12 hours, say between 8:00am and 8:30pm. Even on one of their smaller tiers this is still quite a savings:

t2.medium @ $0.056/Hour = $41.664/month
Shut down for 12 hours = Saving $20.832 / month

If you do want to do this I would recommend staying away from "Lambda" - I tried playing around with it but there is no need to add scripted Node.js or Python to do something Amazon's CLI can do. And as you do want to run native CLI command the best place to start is AWS Data Piple. They have a great guide which is whats has got me started. If you want to know more:
How do I stop and start Amazon EC2 Instances at scheduled intervals with AWS Data Pipeline?