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
posta 10 mesi fa387 visualizzazioni
2 Risposte
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
ESPERTO
con risposta 10 mesi fa
profile picture
ESPERTO
verificato 10 mesi fa
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
con risposta 10 mesi fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande