# Add-ons

In order to support various unique functions for different cloud providers, we provide add-ons.

## AWS  <a href="#aws" id="aws"></a>

The ALM-agent enables you to perform specific actions when Auto Scaling Instances or Spot Instances are terminated.

### How ALM Agent Works

* Deregisters the instance from the load balancer.
  * After the instance is deregistered, it no longer receives traffic from the load balancer.
* Executes the specified script.
  * If you put the script named `pre_shutdown.sh` under the root (`/`) folder in the Docker Image, the ALM-agent executes the script.

### Conditions

* Auto Scaling puts the instance into `Terminating:Wait`.
* Amazon EC2 will interrupt Spot Instances.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.alphaus.cloud/v3.0-english/alm-agent/add-ons.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
