Search code examples
amazon-web-servicesamazon-ec2aws-auto-scaling

How to change instance type in AutoScalingGroups using API?


I need to change EC2 instance type in AutoScalingGroups using API. In my case, I'm using nodejs, but it does not matter.

This link says that the only parameters from description method are available. https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-auto-scaling/classes/updateautoscalinggroupcommand.html

To see which properties have been set, call the DescribeAutoScalingGroups API. To view the scaling policies for an Auto Scaling group, call the DescribePolicies API. If the group has scaling policies, you can update them by calling the PutScalingPolicy API.

But there are no related option: enter image description here

Is there any workaround to get it done?


Solution

  • You have to do that by creating new launch configuration or new version of your launch template, and then update your group to use the new Launch Configuration or Launch Template.