AutoScaling Group Instance refresh being ignored for Scale-In protected instances

0

When i run an "Instance Refresh", on an ASG that have instances which have the "Scale In Protected" flag enabled, the refresh fails (no errors) to refresh those instances even though i have set the value "Scale-in protected instances" to "Replace" from the console.

I also have tried with a Lambda running the following python code. The refresh also fails to start in this case.

    response = asgclient.start_instance_refresh(
        AutoScalingGroupName=event['ASGName'],
        Strategy='Rolling',
        DesiredConfiguration={
            'LaunchTemplate': {
                'LaunchTemplateId': event['LaunchTemplateID'],
                'Version':  event['NewLaunchTemplateVer']}
        },
        Preferences={
            'MinHealthyPercentage': int(event['ASGHealthPerc']),
            'InstanceWarmup': int(event['ASGWarmUp']),
            'SkipMatching': True,
            'ScaleInProtectedInstances': 'Refresh'
        }
    )
Kal
asked 9 months ago370 views
2 Answers
0

Hi, it is recent feature for Scale-In Protected instances: see https://aws.amazon.com/about-aws/whats-new/2023/02/amazon-ec2-auto-scaling-instance-refresh-standby-scale-in-protected-ec2/

But, nonetheless, it should work given the way you configured it.

So, you may want to open a Support case for this.

Best

Didier

profile pictureAWS
EXPERT
answered 9 months ago
profile picture
EXPERT
reviewed 9 months ago
0

Hi,

  1. When you say "fails (no errors) to refresh", what is the status of the Instance Refresh? Is it showing failed, Sucessful, or something else?
  2. How long did it take to run?
  3. Can you provide some more information on this the ASG this Refresh was run on ? I see that 'skip matching' is enabled. Are all the existing instances already using the Launch Template version defined in your DesiredConfiguration? If so, there's nothing to refresh, and the expected behavior is for the Refresh to succeed almost immediately.
AWS
answered 9 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions