shiichan

Make Launch Before Terminate the account-wide default in EC2 Auto Scaling!

Hi, it's Shii-chan!

AWS What's New aws.amazon.com

Did you ever worry about losing capacity while instances get replaced? Here's an update that helps!

What was announced?

According to AWS What's New, EC2 Auto Scaling now lets you enable Launch Before Terminate as the default replacement behavior across all Auto Scaling groups in your account. When it's on, Auto Scaling launches a replacement instance and waits for it to pass health checks before terminating the instance it replaces.

The story so far

This behavior had to be configured on each Auto Scaling group. With many groups, it was easy to miss one, and capacity could still dip during replacement.

What changes

You enable it once in the account settings and it applies to every group. Your applications keep full capacity and availability during replacements.

Dive Deep

It applies to these replacement events:

  • Instance refreshes
  • Rebalancing
  • Health check replacements
  • Maximum-instance-lifetime replacements

Setup details:

  • Where: EC2 Auto Scaling account settings
  • New APIs: PutAccountSetting and DescribeAccountSettings
  • Interfaces: AWS Management Console, AWS CLI and AWS SDKs
  • Availability: all AWS Regions, at no additional cost

Wrap-up

  • Launch Before Terminate can be the account-level default
  • A replacement launches first and must pass health checks before the old instance terminates
  • Managed with the new PutAccountSetting / DescribeAccountSettings APIs
  • All Regions, no extra cost

If you run many Auto Scaling groups and worry about capacity during replacements, this one is for you!