as
  1. Help Center
  2. FAQs
  3. Instance
  4. Will the Application Data on an Instance Be Retained After the Instance Is Removed from an AS Group and Deleted?

Will the Application Data on an Instance Be Retained After the Instance Is Removed from an AS Group and Deleted?

No. AS automatically releases ECS instances. You must ensure that instances in the AS group do not store application status information or important data, such as sessions, databases, and logs. If you want to store your application status, you can store it on an independent server (such as ECS) or database (such as RDS database).

If you want to back up data or download log files before an instance is removed from an AS group, you can add a lifecycle hook of the instance removal type to the AS group. After a lifecycle hook is added to an AS group, when the AS group performs a scaling action, the lifecycle hook suspends the instance that is being removed from the AS group and sets the instance to be in waiting state. During the waiting period, you can perform customized operations on the instance, for example, to back up data or to download log files.