Exercise 12.1 – stopping and starting EC2 instances at regular intervals using AWS Lambda
Imagine a scenario where you need to run a fleet of on-demand EC2 test servers that your user acceptance testing (UAT) team needs to perform multiple functional and technical tests on for an upcoming application that you are developing. Your UAT team only works from Monday to Friday, 9 A.M. to 5 P.M. The UAT team only needs access to the fleet of test servers during this time. Rather than have a technician manually start up all the servers in the morning and shut them down again at the end of the business day, you could automate the process using AWS Lambda. You would not want to have your on-demand EC2 instances running when they are not needed because you are charged for every hour that those servers are running.
In this exercise, we will look at how to configure AWS Lambda to automatically stop and then start your EC2 instances at defined schedules.
To complete the exercises in...