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
gefragt vor 10 Monaten389 Aufrufe
2 Antworten
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
EXPERTE
beantwortet vor 10 Monaten
profile picture
EXPERTE
überprüft vor 10 Monaten
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
beantwortet vor 10 Monaten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen