# AWS: Move Auto Scaling Group Into Standby

Moves one or more EC2 instances in an Auto Scaling Group into Standby, detaching them from load balancers without terminating them.


> **Availability:** See the [Incident Workflow Actions Overview table](/workflow-actions) for the plans this workflow is available on.

## Description

**Premium.** This action is a Premium Workflow Action, billed separately from your PagerDuty plan. In the workflow action picker, this action appears as **Auto Scaling: Enter Standby**.

Move one or more EC2 instances in an Auto Scaling Group (ASG) into Standby. Instances in Standby are detached from load balancers and do not receive traffic; the ASG can launch replacement instances if desired capacity is maintained. You can choose whether to decrement desired capacity by the number of instances moved to standby. This action is useful for:

- Rotating instances out of an ASG during incident response (e.g., move to standby, wait for replacement, then terminate)
- Taking instances out of service for maintenance or troubleshooting without terminating them
- Building runbooks that combine with Set Instance Protection, Describe Auto Scaling Instances, and Terminate Instance in Auto Scaling Group
- Letting the ASG launch replacement instances before terminating the old one when **Should Decrement Desired Capacity** is set to **false**

## Instructions

1. If you have not done so, follow the instructions to [Create an Incident Workflow](/ai-automation/automation/incident-workflows#create-an-incident-workflow).
2. When the instructions prompt you to [add actions](/ai-automation/automation/incident-workflows#add-actions), select **this action**.
3. Enter the following **Inputs** and click **Save**.
4. Continue following instructions to **Publish** the Workflow.
5. When the action runs, you will see the **Outputs** listed below.

## Inputs

> **Field References:** Fields with the **\{+\}** icon accept [Field References](/ai-automation/automation/incident-workflows#field-references), which can be useful for referencing incident data or outputs created in prior workflow steps. To add Field References, click **\{+\}**, or enter `{{`, and select relevant fields. Refer to the [Field References](/ai-automation/automation/incident-workflows#field-references) article for more information.

| Name                              | Description                                                                                                                                                                                                  |
| :-------------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Integration                       | Select a [Workflow Integration](/ai-automation/automation/incident-workflows/workflow-integrations) or click **New AWS Connection** to establish a new one.                                                       |
| Auto Scaling Group Name           | The name of the Auto Scaling Group that contains the instances.                                                                                                                                              |
| Instance IDs                      | One or more EC2 instance IDs to move to Standby (comma-separated). Can be from a prior step (e.g., Describe Auto Scaling Instances) or from incident custom details.                                         |
| AWS Region                        | The AWS region where the ASG is located. If left blank, the action uses `us-east-1` as the default.                                                                                                          |
| Should Decrement Desired Capacity | Whether to reduce the ASG's desired capacity by the number of instances moved to standby. Set to **false** (default) to keep capacity so the ASG launches replacements; set to **true** to shrink the group. |

## Outputs

| Name              | Description                                                                                      |
| :---------------- | :----------------------------------------------------------------------------------------------- |
| Activities        | JSON array of Auto Scaling activity records returned by the API for the Enter Standby operation. |
| Placed In Standby | Array of instance IDs that were successfully placed in Standby.                                  |
| Result            | Whether the action succeeded: **Success** or **Failed**.                                         |
| Result Summary    | Brief description of what the action did or if it failed.                                        |
| Error             | Error message, if the action failed.                                                             |

> **Tips:** - **Instance Rotation**: For instance-rotation runbooks, use **Should Decrement Desired Capacity** = **false** so the ASG launches a replacement before you terminate the instance in a later step.
> - **Chaining Actions**: Use the **Auto Scaling Group Name** and **Instance IDs** from **Auto Scaling: Describe Auto Scaling Instances** so the workflow works when the incident only provides an instance ID.
