I'm getting puzzled by this,
I need to increase the specs of an EC2 instance and following this tutorial: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-resize.html#change-instance-type-of-ebs-backed-instance
but it appears that the instance is connected to an autoscaling group, so as soon as I stop it another one is spawn, and the one I stopped is terminated, so I can't change its type.
I tried detatching the instance from the autoscaling group, but it doesn't do it because there needs to be at least one.
and if I change the minimum capacity it actually also terminates it and can't update its type.
how can I change the instance type of this EC2 box?
CodePudding user response:
Try creating a new launch configuration with the new ami and point the auto scaling group to use it
EDIT:
Try following this : https://docs.aws.amazon.com/autoscaling/ec2/userguide/create-launch-template.html
CodePudding user response:
Auto Scaling groups have either a Launch Template or Launch Configuration attached to them. These specify what kind of properties have the instances which are launched by the auto scaling group.
If you want to modify the type of an instance controlled by an ASG, you have to update the Launch Configuration/Launch Template. Afterwards, you can terminate the running instances one by one, the auto scaling group will relaunch them with the updated properties.