Workflow Actions
AWS: Retrieve Capacity, Health, and Instance of ASG
Returns desired capacity, minimum and maximum size, and per-instance health and lifecycle state for one or more Auto Scaling Groups.
Availability
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: Describe Auto Scaling Groups.
Retrieve capacity, health, and instance membership for one or more Auto Scaling Groups (ASGs). The action returns desired capacity, min and max size, and a list of instances in each group with their lifecycle state, health status, and protection settings. This action is useful for:
- Checking current ASG capacity before scaling up or adjusting max size during instance rotation
- Building conditional logic (e.g., only bump max size when desired equals max) in multi-step runbooks
- Gathering diagnostic information about which instances are in service, in standby, or unhealthy
- Chaining with Update Auto Scaling Group or other Auto Scaling actions in a single workflow
Instructions
- If you have not done so, follow the instructions to Create an Incident Workflow.
- When the instructions prompt you to add actions, select this action.
- Enter the following Inputs and click Save.
- Continue following instructions to Publish the Workflow.
- When the action runs, you will see the Outputs listed below.
Inputs
Field References
Fields with the {+} icon accept 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 article for more information.
| Name | Description |
|---|---|
| Integration | Select a Workflow Integration or click New AWS Connection to establish a new one. |
| Auto Scaling Group Names | One or more Auto Scaling Group names to describe (comma-separated). You can reference the ASG name from a prior step (e.g., from Describe Auto Scaling Instances). |
| AWS Region | The AWS region where the Auto Scaling Groups are located. If left blank, the action uses us-east-1 as the default. |
Outputs
| Name | Description |
|---|---|
| Groups | JSON array of ASG details. Each group includes: asgName, desiredCapacity, minSize, maxSize, instances (array with instanceId, lifecycleState, healthStatus, protectedFromScaleIn, availabilityZone, launchTemplate, launchConfigurationName), targetGroupARNs, loadBalancerNames, terminationPolicies. |
| 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
- Chaining Actions: Use the output from Auto Scaling: Describe Auto Scaling Instances (e.g.,
instances[0].asgName) as the Auto Scaling Group Names input when building a rotate-or-scale workflow. - Conditional Logic: Reference Groups in a subsequent Logic step (e.g.,
groups[0].desiredCapacity,groups[0].maxSize) to implement conditional logic such as bumping max size only when at capacity.