---
title: AWS Auto Scaling actions
source: https://docs.newrelic.com/docs/workflow-automation/setup-and-configure/actions-catalog/aws/aws-autoscaling
---

This page provides a reference for AWS Auto Scaling actions available in the workflow automation actions catalog. Use these actions to manage Auto Scaling Groups (ASGs) — attaching and detaching instances, adjusting capacity, executing scaling policies, managing instance refreshes, controlling scaling processes, and querying ASG state.

## Prerequisites

Before using AWS Auto Scaling actions in workflow automation, you need:

-   An AWS account with permissions for the Auto Scaling service.
-   AWS credentials configured as an IAM role ARN or static access key credentials.
-   A secret in the New Relic Secrets Service for any static credentials. Reference it in the workflow as `${{ :secrets:<keyName> }}`.

See [Set up AWS credentials](https://docs.newrelic.com/docs/workflow-automation/setup-and-configure/set-up-aws-credentials/) for how to create IAM users and IAM roles, and set up static and session AWS credentials.

## Attach instances

The action identifier is `aws.autoscaling.attachInstances`.

Attach one or more EC2 instances to an existing Auto Scaling group. Attaching instances increases the desired capacity by the number attached. You can attach up to 20 instances per call. Instances must be in running or stopped state, and attaching must not exceed the group's maximum size.

### Inputs

The following table describes all available input fields for this action.

| Input                    | Type   | Description                                                                                                                                                                      | Example                                           |
| ------------------------ | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------- |
| **awsRoleArn**           | String | **Optional.** IAM role ARN. The executor assumes this role via STS to authenticate with AWS. Recommended over static credentials. At least one authentication field is required. | `arn:aws:iam::123456789012:role/my-workflow-role` |
| **awsAccessKeyId**       | String | **Optional.** AWS access key ID. Must be passed as a secret reference.                                                                                                           | `${{ :secrets:awsAccessKeyId }}`                  |
| **awsSecretAccessKey**   | String | **Optional.** AWS secret access key. Must be passed as a secret reference.                                                                                                       | `${{ :secrets:awsSecretAccessKey }}`              |
| **awsSessionToken**      | String | **Optional.** AWS session token for temporary credentials. Must be passed as a secret reference.                                                                                 | `${{ :secrets:awsSessionToken }}`                 |
| **region**               | String | **Required.** AWS region where the Auto Scaling group is located.                                                                                                                | `"us-east-1"`                                     |
| **autoScalingGroupName** | String | **Required.** Name of the Auto Scaling group.                                                                                                                                    | `"my-asg"`                                        |
| **instanceIds**          | List   | **Required.** EC2 instance IDs to attach.                                                                                                                                        | `["i-0123456789abcdef0", "i-0fedcba9876543210"]`  |
| **selectors**            | List   | **Optional.** JQ selectors to extract specific fields from the action output.                                                                                                    | `[{"name": "success", "expression": ".success"}]` |

### Outputs

The following table describes all output fields returned by this action.

| Output           | Type    | Description                                                                                                                                                                                               |
| ---------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **response**     | Object  | AWS API response object. See [attach_instances — Boto3 documentation](https://docs.aws.amazon.com/boto3/latest/reference/services/autoscaling/client/attach_instances.html) for the full response syntax. |
| **success**      | Boolean | `true` if the action succeeded, `false` otherwise.                                                                                                                                                        |
| **errorMessage** | String  | Error message if the action failed. `null` on success.                                                                                                                                                    |

### Example

The following example attaches an EC2 instance to an Auto Scaling group.

| Workflow example                                                                                                                                                                                                                                                                                                                                                                                                                             |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ```yaml name: asg-attach-instances workflowInputs:   arnRole:     type: String   asgName:     type: String steps:   - name: attachInstances     type: action     action: aws.autoscaling.attachInstances     version: '1'     inputs:       awsRoleArn: ${{ .workflowInputs.arnRole }}       region: us-east-1       autoScalingGroupName: ${{ .workflowInputs.asgName }}       instanceIds:         - i-0123456789abcdef0     next: end ``` |

## Detach instances

The action identifier is `aws.autoscaling.detachInstances`.

Detach one or more EC2 instances from an Auto Scaling group. You can detach up to 20 instances per call. Instances must be in `InService` or `Standby` state. If `shouldDecrementDesiredCapacity` is `false`, the ASG launches replacement instances to maintain desired capacity.

### Inputs

The following table describes all available input fields for this action.

| Input                              | Type    | Description                                                                                                                                                                      | Example                                                          |
| ---------------------------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------- |
| **awsRoleArn**                     | String  | **Optional.** IAM role ARN. The executor assumes this role via STS to authenticate with AWS. Recommended over static credentials. At least one authentication field is required. | `arn:aws:iam::123456789012:role/my-workflow-role`                |
| **awsAccessKeyId**                 | String  | **Optional.** AWS access key ID. Must be passed as a secret reference.                                                                                                           | `${{ :secrets:awsAccessKeyId }}`                                 |
| **awsSecretAccessKey**             | String  | **Optional.** AWS secret access key. Must be passed as a secret reference.                                                                                                       | `${{ :secrets:awsSecretAccessKey }}`                             |
| **awsSessionToken**                | String  | **Optional.** AWS session token for temporary credentials. Must be passed as a secret reference.                                                                                 | `${{ :secrets:awsSessionToken }}`                                |
| **region**                         | String  | **Required.** AWS region where the Auto Scaling group is located.                                                                                                                | `"us-east-1"`                                                    |
| **autoScalingGroupName**           | String  | **Required.** Name of the Auto Scaling group.                                                                                                                                    | `"my-asg"`                                                       |
| **instanceIds**                    | List    | **Required.** EC2 instance IDs to detach.                                                                                                                                        | `["i-0123456789abcdef0"]`                                        |
| **shouldDecrementDesiredCapacity** | Boolean | **Required.** If `true`, reduces the desired capacity by the number of detached instances. If `false`, the ASG launches replacements.                                            | `true`                                                           |
| **selectors**                      | List    | **Optional.** JQ selectors to extract specific fields from the action output.                                                                                                    | `[{"name": "activities", "expression": ".response.Activities"}]` |

### Outputs

The following table describes all output fields returned by this action.

| Output           | Type    | Description                                                                                                                                                                                               |
| ---------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **response**     | Object  | AWS API response object. See [detach_instances — Boto3 documentation](https://docs.aws.amazon.com/boto3/latest/reference/services/autoscaling/client/detach_instances.html) for the full response syntax. |
| **success**      | Boolean | `true` if the action succeeded, `false` otherwise.                                                                                                                                                        |
| **errorMessage** | String  | Error message if the action failed. `null` on success.                                                                                                                                                    |

### Example

The following example detaches an instance and decrements the desired capacity.

| Workflow example                                                                                                                                                                                                                                                                                                                                                                                                                    |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ```yaml name: asg-detach-instances workflowInputs:   arnRole:     type: String steps:   - name: detachInstances     type: action     action: aws.autoscaling.detachInstances     version: '1'     inputs:       awsRoleArn: ${{ .workflowInputs.arnRole }}       region: us-east-1       autoScalingGroupName: my-asg       instanceIds:         - i-0123456789abcdef0       shouldDecrementDesiredCapacity: true     next: end ``` |

## Set desired capacity

The action identifier is `aws.autoscaling.setDesiredCapacity`.

Update the desired instance count of an Auto Scaling group. The new value must fall between the group's `MinSize` and `MaxSize`. If `honorCooldown` is `true`, the request is rejected when the ASG is within its cooldown period.

### Inputs

The following table describes all available input fields for this action.

| Input                    | Type    | Description                                                                                                                                                                      | Example                                           |
| ------------------------ | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------- |
| **awsRoleArn**           | String  | **Optional.** IAM role ARN. The executor assumes this role via STS to authenticate with AWS. Recommended over static credentials. At least one authentication field is required. | `arn:aws:iam::123456789012:role/my-workflow-role` |
| **awsAccessKeyId**       | String  | **Optional.** AWS access key ID. Must be passed as a secret reference.                                                                                                           | `${{ :secrets:awsAccessKeyId }}`                  |
| **awsSecretAccessKey**   | String  | **Optional.** AWS secret access key. Must be passed as a secret reference.                                                                                                       | `${{ :secrets:awsSecretAccessKey }}`              |
| **awsSessionToken**      | String  | **Optional.** AWS session token for temporary credentials. Must be passed as a secret reference.                                                                                 | `${{ :secrets:awsSessionToken }}`                 |
| **region**               | String  | **Required.** AWS region where the Auto Scaling group is located.                                                                                                                | `"us-east-1"`                                     |
| **autoScalingGroupName** | String  | **Required.** Name of the Auto Scaling group.                                                                                                                                    | `"my-asg"`                                        |
| **desiredCapacity**      | Int     | **Required.** Target number of instances. Must be between the group's `MinSize` and `MaxSize`.                                                                                   | `3`                                               |
| **honorCooldown**        | Boolean | **Optional.** If `true`, rejects the request when the ASG is in a cooldown period. Defaults to `false`.                                                                          | `false`                                           |
| **selectors**            | List    | **Optional.** JQ selectors to extract specific fields from the action output.                                                                                                    | `[{"name": "success", "expression": ".success"}]` |

### Outputs

The following table describes all output fields returned by this action.

| Output           | Type    | Description                                                                                                                                                                                                       |
| ---------------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **response**     | Object  | AWS API response object. See [set_desired_capacity — Boto3 documentation](https://docs.aws.amazon.com/boto3/latest/reference/services/autoscaling/client/set_desired_capacity.html) for the full response syntax. |
| **success**      | Boolean | `true` if the action succeeded, `false` otherwise.                                                                                                                                                                |
| **errorMessage** | String  | Error message if the action failed. `null` on success.                                                                                                                                                            |

### Example

The following example sets the desired capacity to 5 instances.

| Workflow example                                                                                                                                                                                                                                                                                                                                                                              |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ```yaml name: asg-set-capacity workflowInputs:   arnRole:     type: String steps:   - name: setDesiredCapacity     type: action     action: aws.autoscaling.setDesiredCapacity     version: '1'     inputs:       awsRoleArn: ${{ .workflowInputs.arnRole }}       region: us-east-1       autoScalingGroupName: my-asg       desiredCapacity: 5       honorCooldown: false     next: end ``` |

## Execute a scaling policy

The action identifier is `aws.autoscaling.executePolicy`.

Execute a named scaling policy on an Auto Scaling group. The policy must already exist on the group. For step scaling policies, `metricValue` and `breachThreshold` can override the policy thresholds. If `honorCooldown` is `true` and the ASG is in cooldown, the call succeeds but no scaling activity is triggered.

### Inputs

The following table describes all available input fields for this action.

| Input                    | Type    | Description                                                                                                                                                                      | Example                                           |
| ------------------------ | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------- |
| **awsRoleArn**           | String  | **Optional.** IAM role ARN. The executor assumes this role via STS to authenticate with AWS. Recommended over static credentials. At least one authentication field is required. | `arn:aws:iam::123456789012:role/my-workflow-role` |
| **awsAccessKeyId**       | String  | **Optional.** AWS access key ID. Must be passed as a secret reference.                                                                                                           | `${{ :secrets:awsAccessKeyId }}`                  |
| **awsSecretAccessKey**   | String  | **Optional.** AWS secret access key. Must be passed as a secret reference.                                                                                                       | `${{ :secrets:awsSecretAccessKey }}`              |
| **awsSessionToken**      | String  | **Optional.** AWS session token for temporary credentials. Must be passed as a secret reference.                                                                                 | `${{ :secrets:awsSessionToken }}`                 |
| **region**               | String  | **Required.** AWS region where the Auto Scaling group is located.                                                                                                                | `"us-east-1"`                                     |
| **autoScalingGroupName** | String  | **Required.** Name of the Auto Scaling group.                                                                                                                                    | `"my-asg"`                                        |
| **policyName**           | String  | **Required.** Name or ARN of the scaling policy to execute.                                                                                                                      | `"my-scale-out-policy"`                           |
| **honorCooldown**        | Boolean | **Optional.** If `true` and the ASG is in cooldown, the call succeeds but no scaling activity is triggered.                                                                      | `false`                                           |
| **metricValue**          | String  | **Optional.** Metric value override for step scaling policies.                                                                                                                   | `"50.0"`                                          |
| **breachThreshold**      | String  | **Optional.** Breach threshold override for step scaling policies.                                                                                                               | `"70.0"`                                          |
| **selectors**            | List    | **Optional.** JQ selectors to extract specific fields from the action output.                                                                                                    | `[{"name": "success", "expression": ".success"}]` |

### Outputs

The following table describes all output fields returned by this action.

| Output           | Type    | Description                                                                                                                                                                                           |
| ---------------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **response**     | Object  | AWS API response object. See [execute_policy — Boto3 documentation](https://docs.aws.amazon.com/boto3/latest/reference/services/autoscaling/client/execute_policy.html) for the full response syntax. |
| **success**      | Boolean | `true` if the action succeeded, `false` otherwise.                                                                                                                                                    |
| **errorMessage** | String  | Error message if the action failed. `null` on success.                                                                                                                                                |

### Example

The following example executes a named scale-out policy.

| Workflow example                                                                                                                                                                                                                                                                                                                                                                                   |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ```yaml name: asg-execute-policy workflowInputs:   arnRole:     type: String steps:   - name: executePolicy     type: action     action: aws.autoscaling.executePolicy     version: '1'     inputs:       awsRoleArn: ${{ .workflowInputs.arnRole }}       region: us-east-1       autoScalingGroupName: my-asg       policyName: my-scale-out-policy       honorCooldown: false     next: end ``` |

## Start an instance refresh

The action identifier is `aws.autoscaling.startInstanceRefresh`.

Initiate a rolling replacement of instances using the latest launch template or configuration. Only one refresh can be active per group at a time — if one is already in progress the call fails with `InstanceRefreshInProgress`. Use `aws.autoscaling.describeInstanceRefreshes` to poll status.

### Inputs

The following table describes all available input fields for this action.

| Input                    | Type   | Description                                                                                                                                                                                                                                          | Example                                                                            |
| ------------------------ | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
| **awsRoleArn**           | String | **Optional.** IAM role ARN. The executor assumes this role via STS to authenticate with AWS. Recommended over static credentials. At least one authentication field is required.                                                                     | `arn:aws:iam::123456789012:role/my-workflow-role`                                  |
| **awsAccessKeyId**       | String | **Optional.** AWS access key ID. Must be passed as a secret reference.                                                                                                                                                                               | `${{ :secrets:awsAccessKeyId }}`                                                   |
| **awsSecretAccessKey**   | String | **Optional.** AWS secret access key. Must be passed as a secret reference.                                                                                                                                                                           | `${{ :secrets:awsSecretAccessKey }}`                                               |
| **awsSessionToken**      | String | **Optional.** AWS session token for temporary credentials. Must be passed as a secret reference.                                                                                                                                                     | `${{ :secrets:awsSessionToken }}`                                                  |
| **region**               | String | **Required.** AWS region where the Auto Scaling group is located.                                                                                                                                                                                    | `"us-east-1"`                                                                      |
| **autoScalingGroupName** | String | **Required.** Name of the Auto Scaling group.                                                                                                                                                                                                        | `"my-asg"`                                                                         |
| **strategy**             | String | **Optional.** Refresh strategy. `"Rolling"` is the only supported value.                                                                                                                                                                             | `"Rolling"`                                                                        |
| **preferences**          | Map    | **Optional.** Refresh preferences. `MinHealthyPercentage` controls how many instances remain healthy during replacement (default 90%). `InstanceWarmup` sets how long to wait after an instance reaches `InService` before replacing the next batch. | `{"MinHealthyPercentage": 90, "InstanceWarmup": 300}`                              |
| **desiredConfiguration** | Map    | **Optional.** Override the launch template or configuration for this refresh.                                                                                                                                                                        | `{"LaunchTemplate": {"LaunchTemplateId": "lt-0123456789abcdef0", "Version": "2"}}` |
| **selectors**            | List   | **Optional.** JQ selectors to extract specific fields from the action output.                                                                                                                                                                        | `[{"name": "instanceRefreshId", "expression": ".response.InstanceRefreshId"}]`     |

### Outputs

The following table describes all output fields returned by this action.

| Output           | Type    | Description                                                                                                                                                                                                                                                      |
| ---------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **response**     | Object  | Contains `InstanceRefreshId` (string UUID) identifying the refresh. See [start_instance_refresh — Boto3 documentation](https://docs.aws.amazon.com/boto3/latest/reference/services/autoscaling/client/start_instance_refresh.html) for the full response syntax. |
| **success**      | Boolean | `true` if the action succeeded, `false` otherwise.                                                                                                                                                                                                               |
| **errorMessage** | String  | Error message if the action failed. `null` on success.                                                                                                                                                                                                           |

### Example

The following example starts a rolling instance refresh with 90% minimum healthy instances.

| Workflow example                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ```yaml name: asg-start-refresh workflowInputs:   arnRole:     type: String steps:   - name: startInstanceRefresh     type: action     action: aws.autoscaling.startInstanceRefresh     version: '1'     inputs:       awsRoleArn: ${{ .workflowInputs.arnRole }}       region: us-east-1       autoScalingGroupName: my-asg       strategy: Rolling       preferences:         MinHealthyPercentage: 90         InstanceWarmup: 300       selectors:         - name: instanceRefreshId           expression: '.response.InstanceRefreshId'     next: end ``` |

## Cancel an instance refresh

The action identifier is `aws.autoscaling.cancelInstanceRefresh`.

Cancel an in-progress instance refresh. Only an in-progress refresh can be cancelled — calling this when no refresh is active fails with `ActiveInstanceRefreshNotFound`. Instances already replaced are not reverted; use `aws.autoscaling.rollbackInstanceRefresh` to revert replaced instances.

### Inputs

The following table describes all available input fields for this action.

| Input                    | Type   | Description                                                                                                                                                                      | Example                                                                        |
| ------------------------ | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ |
| **awsRoleArn**           | String | **Optional.** IAM role ARN. The executor assumes this role via STS to authenticate with AWS. Recommended over static credentials. At least one authentication field is required. | `arn:aws:iam::123456789012:role/my-workflow-role`                              |
| **awsAccessKeyId**       | String | **Optional.** AWS access key ID. Must be passed as a secret reference.                                                                                                           | `${{ :secrets:awsAccessKeyId }}`                                               |
| **awsSecretAccessKey**   | String | **Optional.** AWS secret access key. Must be passed as a secret reference.                                                                                                       | `${{ :secrets:awsSecretAccessKey }}`                                           |
| **awsSessionToken**      | String | **Optional.** AWS session token for temporary credentials. Must be passed as a secret reference.                                                                                 | `${{ :secrets:awsSessionToken }}`                                              |
| **region**               | String | **Required.** AWS region where the Auto Scaling group is located.                                                                                                                | `"us-east-1"`                                                                  |
| **autoScalingGroupName** | String | **Required.** Name of the Auto Scaling group.                                                                                                                                    | `"my-asg"`                                                                     |
| **selectors**            | List   | **Optional.** JQ selectors to extract specific fields from the action output.                                                                                                    | `[{"name": "instanceRefreshId", "expression": ".response.InstanceRefreshId"}]` |

### Outputs

The following table describes all output fields returned by this action.

| Output           | Type    | Description                                                                                                                                                                                                                                           |
| ---------------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **response**     | Object  | Contains `InstanceRefreshId` of the cancelled refresh. See [cancel_instance_refresh — Boto3 documentation](https://docs.aws.amazon.com/boto3/latest/reference/services/autoscaling/client/cancel_instance_refresh.html) for the full response syntax. |
| **success**      | Boolean | `true` if the action succeeded, `false` otherwise.                                                                                                                                                                                                    |
| **errorMessage** | String  | Error message if the action failed. `null` on success.                                                                                                                                                                                                |

### Example

The following example cancels an in-progress instance refresh.

| Workflow example                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| ```yaml name: asg-cancel-refresh workflowInputs:   arnRole:     type: String steps:   - name: cancelRefresh     type: action     action: aws.autoscaling.cancelInstanceRefresh     version: '1'     inputs:       awsRoleArn: ${{ .workflowInputs.arnRole }}       region: us-east-1       autoScalingGroupName: my-asg       selectors:         - name: instanceRefreshId           expression: '.response.InstanceRefreshId'     next: end ``` |

## Roll back an instance refresh

The action identifier is `aws.autoscaling.rollbackInstanceRefresh`.

Roll back an in-progress instance refresh, reverting replaced instances to their previous launch template or configuration. The group must have a checkpoint enabled to support rollback. If no refresh is eligible for rollback the call fails with `ActiveInstanceRefreshNotFound`.

### Inputs

The following table describes all available input fields for this action.

| Input                    | Type   | Description                                                                                                                                                                      | Example                                                                        |
| ------------------------ | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ |
| **awsRoleArn**           | String | **Optional.** IAM role ARN. The executor assumes this role via STS to authenticate with AWS. Recommended over static credentials. At least one authentication field is required. | `arn:aws:iam::123456789012:role/my-workflow-role`                              |
| **awsAccessKeyId**       | String | **Optional.** AWS access key ID. Must be passed as a secret reference.                                                                                                           | `${{ :secrets:awsAccessKeyId }}`                                               |
| **awsSecretAccessKey**   | String | **Optional.** AWS secret access key. Must be passed as a secret reference.                                                                                                       | `${{ :secrets:awsSecretAccessKey }}`                                           |
| **awsSessionToken**      | String | **Optional.** AWS session token for temporary credentials. Must be passed as a secret reference.                                                                                 | `${{ :secrets:awsSessionToken }}`                                              |
| **region**               | String | **Required.** AWS region where the Auto Scaling group is located.                                                                                                                | `"us-east-1"`                                                                  |
| **autoScalingGroupName** | String | **Required.** Name of the Auto Scaling group.                                                                                                                                    | `"my-asg"`                                                                     |
| **selectors**            | List   | **Optional.** JQ selectors to extract specific fields from the action output.                                                                                                    | `[{"name": "instanceRefreshId", "expression": ".response.InstanceRefreshId"}]` |

### Outputs

The following table describes all output fields returned by this action.

| Output           | Type    | Description                                                                                                                                                                                                                                                 |
| ---------------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **response**     | Object  | Contains `InstanceRefreshId` of the rolled-back refresh. See [rollback_instance_refresh — Boto3 documentation](https://docs.aws.amazon.com/boto3/latest/reference/services/autoscaling/client/rollback_instance_refresh.html) for the full response syntax. |
| **success**      | Boolean | `true` if the action succeeded, `false` otherwise.                                                                                                                                                                                                          |
| **errorMessage** | String  | Error message if the action failed. `null` on success.                                                                                                                                                                                                      |

### Example

The following example rolls back an in-progress instance refresh.

| Workflow example                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| ```yaml name: asg-rollback-refresh workflowInputs:   arnRole:     type: String steps:   - name: rollbackRefresh     type: action     action: aws.autoscaling.rollbackInstanceRefresh     version: '1'     inputs:       awsRoleArn: ${{ .workflowInputs.arnRole }}       region: us-east-1       autoScalingGroupName: my-asg       selectors:         - name: instanceRefreshId           expression: '.response.InstanceRefreshId'     next: end ``` |

## Suspend scaling processes

The action identifier is `aws.autoscaling.suspendProcesses`.

Suspend one or more scaling processes for an Auto Scaling group. Use during deployments or maintenance windows to prevent unwanted scaling activity. If you omit `scalingProcesses`, all processes are suspended. Suspended processes remain suspended until explicitly resumed with `aws.autoscaling.resumeProcesses`.

### Inputs

The following table describes all available input fields for this action.

| Input                    | Type   | Description                                                                                                                                                                                                                                | Example                                           |
| ------------------------ | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------- |
| **awsRoleArn**           | String | **Optional.** IAM role ARN. The executor assumes this role via STS to authenticate with AWS. Recommended over static credentials. At least one authentication field is required.                                                           | `arn:aws:iam::123456789012:role/my-workflow-role` |
| **awsAccessKeyId**       | String | **Optional.** AWS access key ID. Must be passed as a secret reference.                                                                                                                                                                     | `${{ :secrets:awsAccessKeyId }}`                  |
| **awsSecretAccessKey**   | String | **Optional.** AWS secret access key. Must be passed as a secret reference.                                                                                                                                                                 | `${{ :secrets:awsSecretAccessKey }}`              |
| **awsSessionToken**      | String | **Optional.** AWS session token for temporary credentials. Must be passed as a secret reference.                                                                                                                                           | `${{ :secrets:awsSessionToken }}`                 |
| **region**               | String | **Required.** AWS region where the Auto Scaling group is located.                                                                                                                                                                          | `"us-east-1"`                                     |
| **autoScalingGroupName** | String | **Required.** Name of the Auto Scaling group.                                                                                                                                                                                              | `"my-asg"`                                        |
| **scalingProcesses**     | List   | **Optional.** Processes to suspend. Omit to suspend all processes. Valid values: `Launch`, `Terminate`, `HealthCheck`, `ReplaceUnhealthy`, `AZRebalance`, `AlarmNotification`, `ScheduledActions`, `AddToLoadBalancer`, `InstanceRefresh`. | `["Launch", "Terminate", "HealthCheck"]`          |
| **selectors**            | List   | **Optional.** JQ selectors to extract specific fields from the action output.                                                                                                                                                              | `[{"name": "success", "expression": ".success"}]` |

### Outputs

The following table describes all output fields returned by this action.

| Output           | Type    | Description                                                                                                                                                                                                 |
| ---------------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **response**     | Object  | AWS API response object. See [suspend_processes — Boto3 documentation](https://docs.aws.amazon.com/boto3/latest/reference/services/autoscaling/client/suspend_processes.html) for the full response syntax. |
| **success**      | Boolean | `true` if the action succeeded, `false` otherwise.                                                                                                                                                          |
| **errorMessage** | String  | Error message if the action failed. `null` on success.                                                                                                                                                      |

### Example

The following example suspends Launch, Terminate, and HealthCheck processes before a deployment.

| Workflow example                                                                                                                                                                                                                                                                                                                                                                                                               |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| ```yaml name: asg-suspend-for-deploy workflowInputs:   arnRole:     type: String steps:   - name: suspendProcesses     type: action     action: aws.autoscaling.suspendProcesses     version: '1'     inputs:       awsRoleArn: ${{ .workflowInputs.arnRole }}       region: us-east-1       autoScalingGroupName: my-asg       scalingProcesses:         - Launch         - Terminate         - HealthCheck     next: end ``` |

## Resume scaling processes

The action identifier is `aws.autoscaling.resumeProcesses`.

Resume one or more suspended scaling processes. Use after deployments or maintenance windows to restore normal scaling behavior. If you omit `scalingProcesses`, all suspended processes are resumed. If no processes are currently suspended, the call succeeds with no effect.

### Inputs

The following table describes all available input fields for this action.

| Input                    | Type   | Description                                                                                                                                                                      | Example                                           |
| ------------------------ | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------- |
| **awsRoleArn**           | String | **Optional.** IAM role ARN. The executor assumes this role via STS to authenticate with AWS. Recommended over static credentials. At least one authentication field is required. | `arn:aws:iam::123456789012:role/my-workflow-role` |
| **awsAccessKeyId**       | String | **Optional.** AWS access key ID. Must be passed as a secret reference.                                                                                                           | `${{ :secrets:awsAccessKeyId }}`                  |
| **awsSecretAccessKey**   | String | **Optional.** AWS secret access key. Must be passed as a secret reference.                                                                                                       | `${{ :secrets:awsSecretAccessKey }}`              |
| **awsSessionToken**      | String | **Optional.** AWS session token for temporary credentials. Must be passed as a secret reference.                                                                                 | `${{ :secrets:awsSessionToken }}`                 |
| **region**               | String | **Required.** AWS region where the Auto Scaling group is located.                                                                                                                | `"us-east-1"`                                     |
| **autoScalingGroupName** | String | **Required.** Name of the Auto Scaling group.                                                                                                                                    | `"my-asg"`                                        |
| **scalingProcesses**     | List   | **Optional.** Processes to resume. Omit to resume all suspended processes.                                                                                                       | `["Launch", "Terminate", "HealthCheck"]`          |
| **selectors**            | List   | **Optional.** JQ selectors to extract specific fields from the action output.                                                                                                    | `[{"name": "success", "expression": ".success"}]` |

### Outputs

The following table describes all output fields returned by this action.

| Output           | Type    | Description                                                                                                                                                                                               |
| ---------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **response**     | Object  | AWS API response object. See [resume_processes — Boto3 documentation](https://docs.aws.amazon.com/boto3/latest/reference/services/autoscaling/client/resume_processes.html) for the full response syntax. |
| **success**      | Boolean | `true` if the action succeeded, `false` otherwise.                                                                                                                                                        |
| **errorMessage** | String  | Error message if the action failed. `null` on success.                                                                                                                                                    |

### Example

The following example resumes scaling processes after a deployment.

| Workflow example                                                                                                                                                                                                                                                                                                                                                                                                              |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ```yaml name: asg-resume-after-deploy workflowInputs:   arnRole:     type: String steps:   - name: resumeProcesses     type: action     action: aws.autoscaling.resumeProcesses     version: '1'     inputs:       awsRoleArn: ${{ .workflowInputs.arnRole }}       region: us-east-1       autoScalingGroupName: my-asg       scalingProcesses:         - Launch         - Terminate         - HealthCheck     next: end ``` |

## Terminate an instance in a group

The action identifier is `aws.autoscaling.terminateInstanceInAutoScalingGroup`.

Terminate a specific instance in an Auto Scaling group while respecting lifecycle hooks. Set `shouldDecrementDesiredCapacity` to `false` to replace the instance automatically, or `true` to shrink the group.

### Inputs

The following table describes all available input fields for this action.

| Input                              | Type    | Description                                                                                                                                                                      | Example                                                                       |
| ---------------------------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------- |
| **awsRoleArn**                     | String  | **Optional.** IAM role ARN. The executor assumes this role via STS to authenticate with AWS. Recommended over static credentials. At least one authentication field is required. | `arn:aws:iam::123456789012:role/my-workflow-role`                             |
| **awsAccessKeyId**                 | String  | **Optional.** AWS access key ID. Must be passed as a secret reference.                                                                                                           | `${{ :secrets:awsAccessKeyId }}`                                              |
| **awsSecretAccessKey**             | String  | **Optional.** AWS secret access key. Must be passed as a secret reference.                                                                                                       | `${{ :secrets:awsSecretAccessKey }}`                                          |
| **awsSessionToken**                | String  | **Optional.** AWS session token for temporary credentials. Must be passed as a secret reference.                                                                                 | `${{ :secrets:awsSessionToken }}`                                             |
| **region**                         | String  | **Required.** AWS region where the Auto Scaling group is located.                                                                                                                | `"us-east-1"`                                                                 |
| **instanceId**                     | String  | **Required.** ID of the EC2 instance to terminate.                                                                                                                               | `"i-0123456789abcdef0"`                                                       |
| **shouldDecrementDesiredCapacity** | Boolean | **Required.** If `true`, reduces the desired capacity by 1. If `false`, a replacement instance is launched automatically.                                                        | `false`                                                                       |
| **selectors**                      | List    | **Optional.** JQ selectors to extract specific fields from the action output.                                                                                                    | `[{"name": "activityStatus", "expression": ".response.Activity.StatusCode"}]` |

### Outputs

The following table describes all output fields returned by this action.

| Output           | Type    | Description                                                                                                                                                                                                                                                                                                     |
| ---------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **response**     | Object  | Contains an `Activity` object with `ActivityId`, `StatusCode`, and `Progress`. See [terminate_instance_in_auto_scaling_group — Boto3 documentation](https://docs.aws.amazon.com/boto3/latest/reference/services/autoscaling/client/terminate_instance_in_auto_scaling_group.html) for the full response syntax. |
| **success**      | Boolean | `true` if the action succeeded, `false` otherwise.                                                                                                                                                                                                                                                              |
| **errorMessage** | String  | Error message if the action failed. `null` on success.                                                                                                                                                                                                                                                          |

### Example

The following example terminates an unhealthy instance and launches a replacement.

| Workflow example                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| ```yaml name: asg-terminate-unhealthy-instance workflowInputs:   arnRole:     type: String steps:   - name: terminateInstance     type: action     action: aws.autoscaling.terminateInstanceInAutoScalingGroup     version: '1'     inputs:       awsRoleArn: ${{ .workflowInputs.arnRole }}       region: us-east-1       instanceId: i-0123456789abcdef0       shouldDecrementDesiredCapacity: false       selectors:         - name: activityStatus           expression: '.response.Activity.StatusCode'     next: end ``` |

## Move instances to standby

The action identifier is `aws.autoscaling.enterStandby`.

Move one or more instances into standby mode, taking them out of active rotation without terminating them. Use for maintenance on specific instances. Pair with `aws.autoscaling.exitStandby` to return instances to service.

### Inputs

The following table describes all available input fields for this action.

| Input                              | Type    | Description                                                                                                                                                                      | Example                                                          |
| ---------------------------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------- |
| **awsRoleArn**                     | String  | **Optional.** IAM role ARN. The executor assumes this role via STS to authenticate with AWS. Recommended over static credentials. At least one authentication field is required. | `arn:aws:iam::123456789012:role/my-workflow-role`                |
| **awsAccessKeyId**                 | String  | **Optional.** AWS access key ID. Must be passed as a secret reference.                                                                                                           | `${{ :secrets:awsAccessKeyId }}`                                 |
| **awsSecretAccessKey**             | String  | **Optional.** AWS secret access key. Must be passed as a secret reference.                                                                                                       | `${{ :secrets:awsSecretAccessKey }}`                             |
| **awsSessionToken**                | String  | **Optional.** AWS session token for temporary credentials. Must be passed as a secret reference.                                                                                 | `${{ :secrets:awsSessionToken }}`                                |
| **region**                         | String  | **Required.** AWS region where the Auto Scaling group is located.                                                                                                                | `"us-east-1"`                                                    |
| **autoScalingGroupName**           | String  | **Required.** Name of the Auto Scaling group.                                                                                                                                    | `"my-asg"`                                                       |
| **instanceIds**                    | List    | **Optional.** Instance IDs to move to standby. Omit to move all instances.                                                                                                       | `["i-0123456789abcdef0"]`                                        |
| **shouldDecrementDesiredCapacity** | Boolean | **Required.** If `true`, reduces the desired capacity by the number of instances entering standby.                                                                               | `true`                                                           |
| **selectors**                      | List    | **Optional.** JQ selectors to extract specific fields from the action output.                                                                                                    | `[{"name": "activities", "expression": ".response.Activities"}]` |

### Outputs

The following table describes all output fields returned by this action.

| Output           | Type    | Description                                                                                                                                                                                                                                              |
| ---------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **response**     | Object  | Contains an `Activities` array describing each instance's standby transition. See [enter_standby — Boto3 documentation](https://docs.aws.amazon.com/boto3/latest/reference/services/autoscaling/client/enter_standby.html) for the full response syntax. |
| **success**      | Boolean | `true` if the action succeeded, `false` otherwise.                                                                                                                                                                                                       |
| **errorMessage** | String  | Error message if the action failed. `null` on success.                                                                                                                                                                                                   |

### Example

The following example moves an instance to standby for maintenance.

| Workflow example                                                                                                                                                                                                                                                                                                                                                                                                           |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ```yaml name: asg-enter-standby workflowInputs:   arnRole:     type: String steps:   - name: enterStandby     type: action     action: aws.autoscaling.enterStandby     version: '1'     inputs:       awsRoleArn: ${{ .workflowInputs.arnRole }}       region: us-east-1       autoScalingGroupName: my-asg       instanceIds:         - i-0123456789abcdef0       shouldDecrementDesiredCapacity: true     next: end ``` |

## Exit standby

The action identifier is `aws.autoscaling.exitStandby`.

Return one or more instances from standby mode back to active rotation. Pair with `aws.autoscaling.enterStandby` after maintenance is complete. If you omit `instanceIds`, all standby instances are returned to service.

### Inputs

The following table describes all available input fields for this action.

| Input                    | Type   | Description                                                                                                                                                                      | Example                                                          |
| ------------------------ | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------- |
| **awsRoleArn**           | String | **Optional.** IAM role ARN. The executor assumes this role via STS to authenticate with AWS. Recommended over static credentials. At least one authentication field is required. | `arn:aws:iam::123456789012:role/my-workflow-role`                |
| **awsAccessKeyId**       | String | **Optional.** AWS access key ID. Must be passed as a secret reference.                                                                                                           | `${{ :secrets:awsAccessKeyId }}`                                 |
| **awsSecretAccessKey**   | String | **Optional.** AWS secret access key. Must be passed as a secret reference.                                                                                                       | `${{ :secrets:awsSecretAccessKey }}`                             |
| **awsSessionToken**      | String | **Optional.** AWS session token for temporary credentials. Must be passed as a secret reference.                                                                                 | `${{ :secrets:awsSessionToken }}`                                |
| **region**               | String | **Required.** AWS region where the Auto Scaling group is located.                                                                                                                | `"us-east-1"`                                                    |
| **autoScalingGroupName** | String | **Required.** Name of the Auto Scaling group.                                                                                                                                    | `"my-asg"`                                                       |
| **instanceIds**          | List   | **Optional.** Instance IDs to return to active rotation. Omit to exit all standby instances.                                                                                     | `["i-0123456789abcdef0"]`                                        |
| **selectors**            | List   | **Optional.** JQ selectors to extract specific fields from the action output.                                                                                                    | `[{"name": "activities", "expression": ".response.Activities"}]` |

### Outputs

The following table describes all output fields returned by this action.

| Output           | Type    | Description                                                                                                                                                                                                                                           |
| ---------------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **response**     | Object  | Contains an `Activities` array describing each instance's return to service. See [exit_standby — Boto3 documentation](https://docs.aws.amazon.com/boto3/latest/reference/services/autoscaling/client/exit_standby.html) for the full response syntax. |
| **success**      | Boolean | `true` if the action succeeded, `false` otherwise.                                                                                                                                                                                                    |
| **errorMessage** | String  | Error message if the action failed. `null` on success.                                                                                                                                                                                                |

### Example

The following example returns an instance from standby after maintenance.

| Workflow example                                                                                                                                                                                                                                                                                                                                                             |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ```yaml name: asg-exit-standby workflowInputs:   arnRole:     type: String steps:   - name: exitStandby     type: action     action: aws.autoscaling.exitStandby     version: '1'     inputs:       awsRoleArn: ${{ .workflowInputs.arnRole }}       region: us-east-1       autoScalingGroupName: my-asg       instanceIds:         - i-0123456789abcdef0     next: end ``` |

## Create or update a scheduled action

The action identifier is `aws.autoscaling.putScheduledUpdateGroupAction`.

Create or update a scheduled scaling action for an Auto Scaling group. Use `recurrence` for cron-based schedules or `startTime` for one-shot changes. Pair with `aws.autoscaling.deleteScheduledAction` to remove actions.

### Inputs

The following table describes all available input fields for this action.

| Input                    | Type   | Description                                                                                                                                                                      | Example                                           |
| ------------------------ | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------- |
| **awsRoleArn**           | String | **Optional.** IAM role ARN. The executor assumes this role via STS to authenticate with AWS. Recommended over static credentials. At least one authentication field is required. | `arn:aws:iam::123456789012:role/my-workflow-role` |
| **awsAccessKeyId**       | String | **Optional.** AWS access key ID. Must be passed as a secret reference.                                                                                                           | `${{ :secrets:awsAccessKeyId }}`                  |
| **awsSecretAccessKey**   | String | **Optional.** AWS secret access key. Must be passed as a secret reference.                                                                                                       | `${{ :secrets:awsSecretAccessKey }}`              |
| **awsSessionToken**      | String | **Optional.** AWS session token for temporary credentials. Must be passed as a secret reference.                                                                                 | `${{ :secrets:awsSessionToken }}`                 |
| **region**               | String | **Required.** AWS region where the Auto Scaling group is located.                                                                                                                | `"us-east-1"`                                     |
| **autoScalingGroupName** | String | **Required.** Name of the Auto Scaling group.                                                                                                                                    | `"my-asg"`                                        |
| **scheduledActionName**  | String | **Required.** Name of the scheduled action to create or update.                                                                                                                  | `"scale-down-nights"`                             |
| **startTime**            | String | **Optional.** ISO 8601 UTC timestamp for when the action takes effect.                                                                                                           | `"2024-06-01T20:00:00Z"`                          |
| **endTime**              | String | **Optional.** ISO 8601 UTC timestamp for when the recurring action stops.                                                                                                        | `"2024-12-31T23:59:59Z"`                          |
| **recurrence**           | String | **Optional.** Cron expression for recurring schedules.                                                                                                                           | `"0 20 * * *"`                                    |
| **timeZone**             | String | **Optional.** IANA timezone for the recurrence cron expression.                                                                                                                  | `"America/New_York"`                              |
| **minSize**              | Int    | **Optional.** Minimum group size to apply at the scheduled time.                                                                                                                 | `1`                                               |
| **maxSize**              | Int    | **Optional.** Maximum group size to apply at the scheduled time.                                                                                                                 | `10`                                              |
| **desiredCapacity**      | Int    | **Optional.** Desired capacity to apply at the scheduled time.                                                                                                                   | `2`                                               |
| **selectors**            | List   | **Optional.** JQ selectors to extract specific fields from the action output.                                                                                                    | `[{"name": "success", "expression": ".success"}]` |

### Outputs

The following table describes all output fields returned by this action.

| Output           | Type    | Description                                                                                                                                                                                                                                 |
| ---------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **response**     | Object  | AWS API response object. See [put_scheduled_update_group_action — Boto3 documentation](https://docs.aws.amazon.com/boto3/latest/reference/services/autoscaling/client/put_scheduled_update_group_action.html) for the full response syntax. |
| **success**      | Boolean | `true` if the action succeeded, `false` otherwise.                                                                                                                                                                                          |
| **errorMessage** | String  | Error message if the action failed. `null` on success.                                                                                                                                                                                      |

### Example

The following example creates a nightly scale-down action.

| Workflow example                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ```yaml name: asg-create-scheduled-action workflowInputs:   arnRole:     type: String steps:   - name: putScheduledAction     type: action     action: aws.autoscaling.putScheduledUpdateGroupAction     version: '1'     inputs:       awsRoleArn: ${{ .workflowInputs.arnRole }}       region: us-east-1       autoScalingGroupName: my-asg       scheduledActionName: scale-down-nights       recurrence: "0 20 * * *"       timeZone: America/New_York       desiredCapacity: 2       minSize: 1     next: end ``` |

## Delete a scheduled action

The action identifier is `aws.autoscaling.deleteScheduledAction`.

Delete a scheduled scaling action from an Auto Scaling group. Only one action can be deleted per call. If the action name does not exist the call fails with `ValidationError`. Deleting an action does not affect any scaling activity already in progress.

### Inputs

The following table describes all available input fields for this action.

| Input                    | Type   | Description                                                                                                                                                                      | Example                                           |
| ------------------------ | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------- |
| **awsRoleArn**           | String | **Optional.** IAM role ARN. The executor assumes this role via STS to authenticate with AWS. Recommended over static credentials. At least one authentication field is required. | `arn:aws:iam::123456789012:role/my-workflow-role` |
| **awsAccessKeyId**       | String | **Optional.** AWS access key ID. Must be passed as a secret reference.                                                                                                           | `${{ :secrets:awsAccessKeyId }}`                  |
| **awsSecretAccessKey**   | String | **Optional.** AWS secret access key. Must be passed as a secret reference.                                                                                                       | `${{ :secrets:awsSecretAccessKey }}`              |
| **awsSessionToken**      | String | **Optional.** AWS session token for temporary credentials. Must be passed as a secret reference.                                                                                 | `${{ :secrets:awsSessionToken }}`                 |
| **region**               | String | **Required.** AWS region where the Auto Scaling group is located.                                                                                                                | `"us-east-1"`                                     |
| **autoScalingGroupName** | String | **Required.** Name of the Auto Scaling group.                                                                                                                                    | `"my-asg"`                                        |
| **scheduledActionName**  | String | **Required.** Name of the scheduled action to delete.                                                                                                                            | `"scale-down-nights"`                             |
| **selectors**            | List   | **Optional.** JQ selectors to extract specific fields from the action output.                                                                                                    | `[{"name": "success", "expression": ".success"}]` |

### Outputs

The following table describes all output fields returned by this action.

| Output           | Type    | Description                                                                                                                                                                                                             |
| ---------------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **response**     | Object  | AWS API response object. See [delete_scheduled_action — Boto3 documentation](https://docs.aws.amazon.com/boto3/latest/reference/services/autoscaling/client/delete_scheduled_action.html) for the full response syntax. |
| **success**      | Boolean | `true` if the action succeeded, `false` otherwise.                                                                                                                                                                      |
| **errorMessage** | String  | Error message if the action failed. `null` on success.                                                                                                                                                                  |

### Example

The following example deletes a scheduled scaling action.

| Workflow example                                                                                                                                                                                                                                                                                                                                                                                        |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ```yaml name: asg-delete-scheduled-action workflowInputs:   arnRole:     type: String steps:   - name: deleteScheduledAction     type: action     action: aws.autoscaling.deleteScheduledAction     version: '1'     inputs:       awsRoleArn: ${{ .workflowInputs.arnRole }}       region: us-east-1       autoScalingGroupName: my-asg       scheduledActionName: scale-down-nights     next: end ``` |

## Update an Auto Scaling group

The action identifier is `aws.autoscaling.updateAutoScalingGroup`.

Update the configuration of an existing Auto Scaling group — min/max size, desired capacity, health check settings, launch template, and more. Use the `parameters` map to pass any additional fields from the [boto3 update_auto_scaling_group API](https://docs.aws.amazon.com/boto3/latest/reference/services/autoscaling/client/update_auto_scaling_group.html) not listed below.

### Inputs

The following table describes all available input fields for this action.

| Input                      | Type   | Description                                                                                                                                                                      | Example                                                                                                                             |
| -------------------------- | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
| **awsRoleArn**             | String | **Optional.** IAM role ARN. The executor assumes this role via STS to authenticate with AWS. Recommended over static credentials. At least one authentication field is required. | `arn:aws:iam::123456789012:role/my-workflow-role`                                                                                   |
| **awsAccessKeyId**         | String | **Optional.** AWS access key ID. Must be passed as a secret reference.                                                                                                           | `${{ :secrets:awsAccessKeyId }}`                                                                                                    |
| **awsSecretAccessKey**     | String | **Optional.** AWS secret access key. Must be passed as a secret reference.                                                                                                       | `${{ :secrets:awsSecretAccessKey }}`                                                                                                |
| **awsSessionToken**        | String | **Optional.** AWS session token for temporary credentials. Must be passed as a secret reference.                                                                                 | `${{ :secrets:awsSessionToken }}`                                                                                                   |
| **region**                 | String | **Required.** AWS region where the Auto Scaling group is located.                                                                                                                | `"us-east-1"`                                                                                                                       |
| **autoScalingGroupName**   | String | **Required.** Name of the Auto Scaling group to update.                                                                                                                          | `"my-asg"`                                                                                                                          |
| **minSize**                | Int    | **Optional.** New minimum group size.                                                                                                                                            | `1`                                                                                                                                 |
| **maxSize**                | Int    | **Optional.** New maximum group size.                                                                                                                                            | `10`                                                                                                                                |
| **desiredCapacity**        | Int    | **Optional.** New desired instance count.                                                                                                                                        | `3`                                                                                                                                 |
| **defaultCooldown**        | Int    | **Optional.** Default cooldown period in seconds.                                                                                                                                | `300`                                                                                                                               |
| **healthCheckType**        | String | **Optional.** Health check type. Allowed values: `EC2`, `ELB`.                                                                                                                   | `"ELB"`                                                                                                                             |
| **healthCheckGracePeriod** | Int    | **Optional.** Seconds after instance launch before health checks begin.                                                                                                          | `300`                                                                                                                               |
| **parameters**             | Map    | **Optional.** Any additional boto3 `update_auto_scaling_group` fields not listed above.                                                                                          | `{"LaunchTemplate": {"LaunchTemplateId": "lt-0123456789abcdef0", "Version": "$Latest"}, "TerminationPolicies": ["OldestInstance"]}` |
| **selectors**              | List   | **Optional.** JQ selectors to extract specific fields from the action output.                                                                                                    | `[{"name": "success", "expression": ".success"}]`                                                                                   |

### Outputs

The following table describes all output fields returned by this action.

| Output           | Type    | Description                                                                                                                                                                                                                 |
| ---------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **response**     | Object  | AWS API response object. See [update_auto_scaling_group — Boto3 documentation](https://docs.aws.amazon.com/boto3/latest/reference/services/autoscaling/client/update_auto_scaling_group.html) for the full response syntax. |
| **success**      | Boolean | `true` if the action succeeded, `false` otherwise.                                                                                                                                                                          |
| **errorMessage** | String  | Error message if the action failed. `null` on success.                                                                                                                                                                      |

### Example

The following example updates min/max bounds, the health check type, and the launch template.

| Workflow example                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ```yaml name: asg-update-group workflowInputs:   arnRole:     type: String steps:   - name: updateAutoScalingGroup     type: action     action: aws.autoscaling.updateAutoScalingGroup     version: '1'     inputs:       awsRoleArn: ${{ .workflowInputs.arnRole }}       region: us-east-1       autoScalingGroupName: my-asg       minSize: 2       maxSize: 20       desiredCapacity: 5       healthCheckType: ELB       healthCheckGracePeriod: 300       parameters:         LaunchTemplate:           LaunchTemplateId: lt-0123456789abcdef0           Version: $Latest         TerminationPolicies:           - OldestInstance     next: end ``` |

## Describe Auto Scaling groups

The action identifier is `aws.autoscaling.describeAutoScalingGroups`.

Describe one or more Auto Scaling groups, returning configuration and instance state. If you omit `autoScalingGroupNames`, all groups in the region are returned. Use `maxRecords` and `nextToken` to paginate large result sets.

### Inputs

The following table describes all available input fields for this action.

| Input                     | Type   | Description                                                                                                                                                                      | Example                                                                                         |
| ------------------------- | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- |
| **awsRoleArn**            | String | **Optional.** IAM role ARN. The executor assumes this role via STS to authenticate with AWS. Recommended over static credentials. At least one authentication field is required. | `arn:aws:iam::123456789012:role/my-workflow-role`                                               |
| **awsAccessKeyId**        | String | **Optional.** AWS access key ID. Must be passed as a secret reference.                                                                                                           | `${{ :secrets:awsAccessKeyId }}`                                                                |
| **awsSecretAccessKey**    | String | **Optional.** AWS secret access key. Must be passed as a secret reference.                                                                                                       | `${{ :secrets:awsSecretAccessKey }}`                                                            |
| **awsSessionToken**       | String | **Optional.** AWS session token for temporary credentials. Must be passed as a secret reference.                                                                                 | `${{ :secrets:awsSessionToken }}`                                                               |
| **region**                | String | **Required.** AWS region where the Auto Scaling group is located.                                                                                                                | `"us-east-1"`                                                                                   |
| **autoScalingGroupNames** | List   | **Optional.** Names of the groups to describe. Omit to return all groups in the region.                                                                                          | `["my-asg", "my-other-asg"]`                                                                    |
| **maxRecords**            | Int    | **Optional.** Maximum number of groups to return. Max 100.                                                                                                                       | `10`                                                                                            |
| **nextToken**             | String | **Optional.** Pagination token from a previous response.                                                                                                                         | `"abcdefgh"`                                                                                    |
| **selectors**             | List   | **Optional.** JQ selectors to extract specific fields from the action output.                                                                                                    | `[{"name": "desiredCapacity", "expression": ".response.AutoScalingGroups[0].DesiredCapacity"}]` |

### Outputs

The following table describes all output fields returned by this action.

| Output           | Type    | Description                                                                                                                                                                                                                                                                                          |
| ---------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **response**     | Object  | Contains an `AutoScalingGroups` array with configuration and instance state for each group. See [describe_auto_scaling_groups — Boto3 documentation](https://docs.aws.amazon.com/boto3/latest/reference/services/autoscaling/client/describe_auto_scaling_groups.html) for the full response syntax. |
| **success**      | Boolean | `true` if the action succeeded, `false` otherwise.                                                                                                                                                                                                                                                   |
| **errorMessage** | String  | Error message if the action failed. `null` on success.                                                                                                                                                                                                                                               |

### Example

The following example retrieves the desired capacity, min, max, and instance count for a group.

| Workflow example                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ```yaml name: asg-describe-group workflowInputs:   arnRole:     type: String steps:   - name: describeGroups     type: action     action: aws.autoscaling.describeAutoScalingGroups     version: '1'     inputs:       awsRoleArn: ${{ .workflowInputs.arnRole }}       region: us-east-1       autoScalingGroupNames:         - my-asg       selectors:         - name: desiredCapacity           expression: '.response.AutoScalingGroups[0].DesiredCapacity'         - name: minSize           expression: '.response.AutoScalingGroups[0].MinSize'         - name: maxSize           expression: '.response.AutoScalingGroups[0].MaxSize'         - name: instanceCount           expression: '.response.AutoScalingGroups[0].Instances | length'     next: end ``` |

## Describe instance refreshes

The action identifier is `aws.autoscaling.describeInstanceRefreshes`.

Describe the status of one or more instance refreshes for an Auto Scaling group. Use to poll a refresh started by `aws.autoscaling.startInstanceRefresh`. If you omit `instanceRefreshIds`, all refreshes for the group are returned, newest first. Completed, cancelled, and failed refreshes are retained in history.

### Inputs

The following table describes all available input fields for this action.

| Input                    | Type   | Description                                                                                                                                                                      | Example                                                                       |
| ------------------------ | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------- |
| **awsRoleArn**           | String | **Optional.** IAM role ARN. The executor assumes this role via STS to authenticate with AWS. Recommended over static credentials. At least one authentication field is required. | `arn:aws:iam::123456789012:role/my-workflow-role`                             |
| **awsAccessKeyId**       | String | **Optional.** AWS access key ID. Must be passed as a secret reference.                                                                                                           | `${{ :secrets:awsAccessKeyId }}`                                              |
| **awsSecretAccessKey**   | String | **Optional.** AWS secret access key. Must be passed as a secret reference.                                                                                                       | `${{ :secrets:awsSecretAccessKey }}`                                          |
| **awsSessionToken**      | String | **Optional.** AWS session token for temporary credentials. Must be passed as a secret reference.                                                                                 | `${{ :secrets:awsSessionToken }}`                                             |
| **region**               | String | **Required.** AWS region where the Auto Scaling group is located.                                                                                                                | `"us-east-1"`                                                                 |
| **autoScalingGroupName** | String | **Required.** Name of the Auto Scaling group.                                                                                                                                    | `"my-asg"`                                                                    |
| **instanceRefreshIds**   | List   | **Optional.** IDs of specific refreshes to describe. Omit to get all refreshes for the group.                                                                                    | `["08b91cf7-8fa6-48af-b6a6-d227f40f1b9b"]`                                    |
| **maxRecords**           | Int    | **Optional.** Maximum number of refreshes to return. Default 50, max 100.                                                                                                        | `10`                                                                          |
| **nextToken**            | String | **Optional.** Pagination token from a previous response.                                                                                                                         | `"abcdefgh"`                                                                  |
| **selectors**            | List   | **Optional.** JQ selectors to extract specific fields from the action output.                                                                                                    | `[{"name": "status", "expression": ".response.InstanceRefreshes[0].Status"}]` |

### Outputs

The following table describes all output fields returned by this action.

| Output           | Type    | Description                                                                                                                                                                                                                                                                                                  |
| ---------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **response**     | Object  | Contains an `InstanceRefreshes` array with `Status`, `PercentageComplete`, and other refresh details. See [describe_instance_refreshes — Boto3 documentation](https://docs.aws.amazon.com/boto3/latest/reference/services/autoscaling/client/describe_instance_refreshes.html) for the full response syntax. |
| **success**      | Boolean | `true` if the action succeeded, `false` otherwise.                                                                                                                                                                                                                                                           |
| **errorMessage** | String  | Error message if the action failed. `null` on success.                                                                                                                                                                                                                                                       |

### Example

The following example polls the status of a refresh started in a previous step.

| Workflow example                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ```yaml name: asg-poll-refresh workflowInputs:   arnRole:     type: String steps:   - name: describeRefresh     type: action     action: aws.autoscaling.describeInstanceRefreshes     version: '1'     inputs:       awsRoleArn: ${{ .workflowInputs.arnRole }}       region: us-east-1       autoScalingGroupName: my-asg       instanceRefreshIds:         - ${{ .steps.startRefresh.outputs.instanceRefreshId }}       selectors:         - name: refreshStatus           expression: '.response.InstanceRefreshes[0].Status'         - name: percentComplete           expression: '.response.InstanceRefreshes[0].PercentageComplete'     next: end ``` |

## Describe scaling activities

The action identifier is `aws.autoscaling.describeScalingActivities`.

Describe scaling activities for an Auto Scaling group, including in-progress and recently completed events. If you omit `activityIds`, all activities for the group are returned, newest first. Activities include both successful and failed scale-in and scale-out events.

### Inputs

The following table describes all available input fields for this action.

| Input                    | Type    | Description                                                                                                                                                                      | Example                                                                          |
| ------------------------ | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
| **awsRoleArn**           | String  | **Optional.** IAM role ARN. The executor assumes this role via STS to authenticate with AWS. Recommended over static credentials. At least one authentication field is required. | `arn:aws:iam::123456789012:role/my-workflow-role`                                |
| **awsAccessKeyId**       | String  | **Optional.** AWS access key ID. Must be passed as a secret reference.                                                                                                           | `${{ :secrets:awsAccessKeyId }}`                                                 |
| **awsSecretAccessKey**   | String  | **Optional.** AWS secret access key. Must be passed as a secret reference.                                                                                                       | `${{ :secrets:awsSecretAccessKey }}`                                             |
| **awsSessionToken**      | String  | **Optional.** AWS session token for temporary credentials. Must be passed as a secret reference.                                                                                 | `${{ :secrets:awsSessionToken }}`                                                |
| **region**               | String  | **Required.** AWS region where the Auto Scaling group is located.                                                                                                                | `"us-east-1"`                                                                    |
| **autoScalingGroupName** | String  | **Optional.** Name of the group to query. Omit to return activities across all groups.                                                                                           | `"my-asg"`                                                                       |
| **activityIds**          | List    | **Optional.** IDs of specific activities to return.                                                                                                                              | `["3b05db05-2f6e-4e86-af95-29f1f4c2a2b7"]`                                       |
| **includeDeletedGroups** | Boolean | **Optional.** If `true`, includes activities from deleted groups.                                                                                                                | `false`                                                                          |
| **maxRecords**           | Int     | **Optional.** Maximum number of activities to return. Max 100.                                                                                                                   | `10`                                                                             |
| **nextToken**            | String  | **Optional.** Pagination token from a previous response.                                                                                                                         | `"abcdefgh"`                                                                     |
| **selectors**            | List    | **Optional.** JQ selectors to extract specific fields from the action output.                                                                                                    | `[{"name": "latestStatus", "expression": ".response.Activities[0].StatusCode"}]` |

### Outputs

The following table describes all output fields returned by this action.

| Output           | Type    | Description                                                                                                                                                                                                                                                                                        |
| ---------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **response**     | Object  | Contains an `Activities` array with `ActivityId`, `StatusCode`, `Cause`, and timing fields. See [describe_scaling_activities — Boto3 documentation](https://docs.aws.amazon.com/boto3/latest/reference/services/autoscaling/client/describe_scaling_activities.html) for the full response syntax. |
| **success**      | Boolean | `true` if the action succeeded, `false` otherwise.                                                                                                                                                                                                                                                 |
| **errorMessage** | String  | Error message if the action failed. `null` on success.                                                                                                                                                                                                                                             |

### Example

The following example retrieves the 5 most recent scaling activities.

| Workflow example                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ```yaml name: asg-check-activities workflowInputs:   arnRole:     type: String steps:   - name: describeActivities     type: action     action: aws.autoscaling.describeScalingActivities     version: '1'     inputs:       awsRoleArn: ${{ .workflowInputs.arnRole }}       region: us-east-1       autoScalingGroupName: my-asg       maxRecords: 5       selectors:         - name: latestActivity           expression: '.response.Activities[0].StatusCode'     next: end ``` |

## Describe scheduled actions

The action identifier is `aws.autoscaling.describeScheduledActions`.

Describe scheduled scaling actions for an Auto Scaling group. If you omit `scheduledActionNames`, all actions for the group are returned. Filter by `startTime` and `endTime` to narrow results to a time window — these filters are ignored when `scheduledActionNames` is provided.

### Inputs

The following table describes all available input fields for this action.

| Input                    | Type   | Description                                                                                                                                                                      | Example                                                                                 |
| ------------------------ | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- |
| **awsRoleArn**           | String | **Optional.** IAM role ARN. The executor assumes this role via STS to authenticate with AWS. Recommended over static credentials. At least one authentication field is required. | `arn:aws:iam::123456789012:role/my-workflow-role`                                       |
| **awsAccessKeyId**       | String | **Optional.** AWS access key ID. Must be passed as a secret reference.                                                                                                           | `${{ :secrets:awsAccessKeyId }}`                                                        |
| **awsSecretAccessKey**   | String | **Optional.** AWS secret access key. Must be passed as a secret reference.                                                                                                       | `${{ :secrets:awsSecretAccessKey }}`                                                    |
| **awsSessionToken**      | String | **Optional.** AWS session token for temporary credentials. Must be passed as a secret reference.                                                                                 | `${{ :secrets:awsSessionToken }}`                                                       |
| **region**               | String | **Required.** AWS region where the Auto Scaling group is located.                                                                                                                | `"us-east-1"`                                                                           |
| **autoScalingGroupName** | String | **Optional.** Name of the group to query. Omit to list actions across all groups.                                                                                                | `"my-asg"`                                                                              |
| **scheduledActionNames** | List   | **Optional.** Names of specific actions to return. Unknown names are silently ignored.                                                                                           | `["scale-down-nights", "scale-up-mornings"]`                                            |
| **startTime**            | String | **Optional.** ISO 8601 UTC timestamp lower bound for filtering results.                                                                                                          | `"2024-01-01T00:00:00Z"`                                                                |
| **endTime**              | String | **Optional.** ISO 8601 UTC timestamp upper bound for filtering results.                                                                                                          | `"2024-12-31T23:59:59Z"`                                                                |
| **maxRecords**           | Int    | **Optional.** Maximum number of actions to return. Max 100.                                                                                                                      | `10`                                                                                    |
| **nextToken**            | String | **Optional.** Pagination token from a previous response.                                                                                                                         | `"abcdefgh"`                                                                            |
| **selectors**            | List   | **Optional.** JQ selectors to extract specific fields from the action output.                                                                                                    | `[{"name": "scheduledActions", "expression": ".response.ScheduledUpdateGroupActions"}]` |

### Outputs

The following table describes all output fields returned by this action.

| Output           | Type    | Description                                                                                                                                                                                                                                                                                                               |
| ---------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **response**     | Object  | Contains a `ScheduledUpdateGroupActions` array with name, recurrence, timezone, and capacity fields for each action. See [describe_scheduled_actions — Boto3 documentation](https://docs.aws.amazon.com/boto3/latest/reference/services/autoscaling/client/describe_scheduled_actions.html) for the full response syntax. |
| **success**      | Boolean | `true` if the action succeeded, `false` otherwise.                                                                                                                                                                                                                                                                        |
| **errorMessage** | String  | Error message if the action failed. `null` on success.                                                                                                                                                                                                                                                                    |

### Example

The following example lists all scheduled actions for a group.

| Workflow example                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ```yaml name: asg-list-scheduled-actions workflowInputs:   arnRole:     type: String steps:   - name: describeScheduledActions     type: action     action: aws.autoscaling.describeScheduledActions     version: '1'     inputs:       awsRoleArn: ${{ .workflowInputs.arnRole }}       region: us-east-1       autoScalingGroupName: my-asg       selectors:         - name: scheduledActions           expression: '.response.ScheduledUpdateGroupActions'     next: end ``` |
