Creating the launch configuration and Auto Scaling group
Auto Scaling is an AWS Service, which allows us to scale up (adding EC2 instance) or scale down (destroying EC instance) infrastructure automatically in a horizontal manner. Scaling up or scaling down of EC2 instance depends on some policy metrics such as CPU Utilization, health status checks.
AWS Auto Scaling service launches the EC2 instance with the help of the launch configuration. It basically includes the template in which we will mention which AMI, instance type, network configuration, user-data script, and many more, will be used to launch the instance.
Getting ready
To create a launch configuration, we need to create a custom AMI, which should have an application-dependent package such as NodeJS and npm preinstalled on the server. Once we will have the custom AMI, we can create a launch configuration.
Once our launch configuration will be created with the custom AMI, we need to set the desired--minimum and maximum--number of...