Scaling Alarm
This part is completely optional, you don't have to follow along. But I'm going to demonstrate how the auto scaling group can be triggered.
These are the alarms that the auto scaling group created. It creates cloudwatch alarms to monitor how our instances are doing.
In this case, we set 7% CPU usage as the metric and the alarm shows that if the average goes over that amount for a 3 minute interval, then it will create a new instance.
The other alarm is the scale in alarm that it created for us. It's quickly act to scale out but act less quickly when scaling in. This is to optimize up time over everything else.
Now we can see what cloudwatch is monitoring. This alarm is active but it hasn't been triggered because the CPU usage is very low when the app isn't being used.
Fortunately for us, we set the CPU utilization very low and this app happens to be very inefficient. Triggering this alarm will be very easy to do.
If you upload and save some large images for a few minutes, this line should spike straight up.