Autoscaling is used to automatically launch or terminate a certain number of instances based on autoscaling rules and policies set by users.
It is generally used to launch multiple instances of the same configuration. In those cases, the very first thing you need for setting up autoscaling is an AMI.
So, for setting up autoscaling, you will have to perform the following things:
1. Create an AMI of an instance (already configured with all of your requirements)
2. Create a launch configuration using the AMI you created and add a security group.
3. Create an Autoscaling Group using the launch configuration you just created. You can provide the min and max number of instances your autoscaling group can have.
4. You can configure scaling policies on various factors such as, CPU utilization in which if the CPU utilization goes over a certain amount(specified by you) then a certain number of instances(also specified by you) should get launched to balance the load.
For a step to step guide, you can refer to the following link.