One of the benefits of using cloud infrastructure is the ability to deploy and scale up or down really easily. Auto scaling in AWS EC2 allows you to flex your infrastructure based on demand. You are also able to include auto scaling groups in AWS CloudFormation templates.
This tutorial is going to walk you through the configuration of auto scaling and to test it actually works. Although configuring auto scaling is fairly simple once you know how to do it there are a series of steps you need to do in order and I will cover those off here.
I wanted to create a very quick instance and image for this tutorial. If you are going to follow the steps with me this is what you need to do…
#!/bin/bash
apt-get update -y
apt-get upgrade -y
apt-get install apache2 stress -y
systemctl start apache2
systemctl enable --now apache2
Installing “stress” is important for this tutorial but normally you wouldn’t include it. It will allow you to stress the instance to allow the auto scaling to trigger.
Although I have not used it myself I know Netflix have their own stress testing tool called “Chaos Monkey”. It looks pretty interesting and worth checking out.
#tutorial #ec2 #autoscaling #aws #cloud-computing