topics/aws/exercises/asg_dynamic_scaling_policy/solution.md
Go to EC2 service -> Auto Scaling Groups and click on the tab "Automating scaling"
Choose "Target tracking scaling" under "Policy Type"
Set metric type to Average CPU utilization
Set target value to 70% and click on "Create"
If you are using Amazon Linux 2, you can stress the instance with the following:
sudo amazon-linux-extras install epel -y
sudo yum install stress -y
stress -c 4 # assuming you have 4 CPUs
Yes, additional EC2 instance was added
Simply stop the stress command
Yes, one of the EC2 instances was terminated