Reputation: 63
I have a need to customize scale in event. Specifically I have to trigger scale in event in a controlled way - decrease desired size by 1 and terminate one specific instance. This will be done from AWS SDK.
What is the correct order to issue commands: A) terminate instance, decrease desired size. B) decrease desired size, terminate instance.
I want to avoid situation where Autoscalling will terminate another instance when desired size parameter changes.
Upvotes: 1
Views: 52
Reputation: 63
Wading through SDK documentation found exactly what I need. There is API call to terminate an instance in autoscaling group and decrease desired size at the same time.
Documentation and example here: http://docs.aws.amazon.com/sdkforruby/api/Aws/AutoScaling/Client.html#terminate_instance_in_auto_scaling_group-instance_method
Upvotes: 1