This video walks you through the process of creating simple AWS Lambda functions to start/stop specified EC2 instances. Using this Lambda in conjunction with CloudWatch Events you are able to schedule instance down-time for reasons such as cost saving.
The source-code used for both functions can be found here:
https://gist.github.com/eddmann/a9e40...