Updated on 2023-08-18 GMT+08:00

Introduction

In Auto Scaling (AS), instance scale-in means that instances in an AS group are first shut down, and then removed and deleted after you clear the data in these instances. This is also called "graceful shutdown".

Scenario

  1. Configure a message notification to forward AS scale-in events to SMN.
  2. Use FunctionGraph to receive scale-in messages forwarded by SMN and obtain instance information through a customized function.
  3. Call the ECS service to shut down scaled-in instances. Five seconds (or a custom period) after the shutdown, call the AS service to delete the instances.
    Figure 1 Graceful shutdown in AS