Terraform and Scheduling AutoScaling Groups19 Oct 2017
I often advocate the idea that, if done right, using AWS can lower your costs for infrastructure. One great way to accomplish this is to us AutoScaling groups wherever possible. As a most basic feature, AutoScaling Groups allow you to dial up and dial down instances based on driving metrics. Metrics like CPU, RAM and Network can allow your services to expaand when needed and drop down to minimal levels during quiet times. AutoScaling Groups also allow you to set a schedule for increasing or decreasing your capacity. The scheduling feature can come in very handy for managing the availability of resources in a development environment.
Let’s take the use case of a Jenkins Server in our DEV AWS environment. We put Jenkins into an AutoScaling group with a min/max of one instance. This ensures we always have a Jenkins server up and running. If for any reason it’s terminated, the ASG provisions a new one and in minutes we’re back to consistent state.