You have deployed an application in an Auto Scaling Group.
You now want to change the instance type of the instances as the new instance type can improve the application performance.
During the change, there should be no service impact.
How can you achieve this requirement in the most appropriate way?
Click on the arrows to vote for the correct answer
A. B. C. D.Answer - C.
The ideal way is to create a new launch configuration, attach it to the existing Auto Scaling group, and replace the existing instances with the new ones.
Option A is invalid because it is not needed to switch to Elastic Beanstalk.
You should directly change the configurations of the ASG.Option B is invalid because by deleting the old ASG, there will be a service impact.
Option D is invalid because you need to modify the launch configuration of the Auto Scaling group.
Otherwise, new instances of the ASG will still use the old instance type.
For more information on the launch configuration of Auto Scaling groups, please refer to the below document link:
http://docs.aws.amazon.com/autoscaling/latest/userguide/LaunchConfiguration.htmlThe correct answer is C.
Explanation:
An Auto Scaling Group (ASG) is a group of Amazon Elastic Compute Cloud (EC2) instances that are automatically scaled according to the demand for the application. In this scenario, we want to change the instance type of the instances in the ASG to improve the application's performance without causing any service impact.
Option A: Switching to Elastic Beanstalk would require re-deploying the application, which would result in service impact.
Option B: Deleting the old Auto Scaling group and deploying a new one with the new instance type using CloudFormation will result in service impact.
Option D: Creating new EC2 instances with the new instance type and attaching them to the ASG will result in service impact, as the old instances would have to be terminated.
Option C: Create a new launch configuration with the new instance type, attach it to the existing Auto Scaling group, and increase the number of desired instances of the ASG to launch new instances. When the new instances are in healthy status, decrease the number of desired instances to terminate instances with the old instance type. This option ensures that the application remains available during the migration process.
Therefore, Option C is the most appropriate way to change the instance type of instances in an Auto Scaling group without causing any service impact.