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
已提問 10 個月前檢視次數 387 次
2 個答案
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
專家
已回答 10 個月前
profile picture
專家
已審閱 10 個月前
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
已回答 10 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南