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
feita há 10 meses387 visualizações
2 Respostas
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
ESPECIALISTA
respondido há 10 meses
profile picture
ESPECIALISTA
avaliado há 10 meses
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
respondido há 10 meses

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas