AWS

Download 617
Last updated Dec 1, 2026

aws-auto-scaling-set-desired-capacity

Modifies the desired instance count for an AWS Auto Scaling group.

Syntax

aws-auto-scaling-set-desired-capacity profile=STRING region=STRING name=STRING capacity=INT

Options

profile=STRING
Required option. The identifier of AWS connect profile
region=STRING
Required option. AWS region
name=STRING
Required option. Autoscaling group name
capacity=INT
Required option. Desired capacity

Output fields

FieldTypeNameDescription
aws_profilestringConnect profileThe identifier of AWS connect profile
regionstringRegione.g. ap-northeast-2
namestringAutoscaling group name
capacityintDesired capacity
statusintHTTP statuse.g. 200

Error codes

Parse errors

Error messageCauseResolution
aws-profile-not-foundNo AWS connect profile matches the name given in the profile option.Check the name on Settings > Connect Profiles and specify it again.
no-permissionThe account running the query is not granted the connect profile.Ask an administrator to grant the connect profile.
invalid-aws-regionThe region option value is not an AWS region name.Enter an exact AWS region name such as ap-northeast-2.
use-one-aws-profileMore than one connect profile was given in the profile option.Specify a single connect profile.
Specify AWS profile name to aws-auto-scaling-set-desired-capacity commandOption validation failed.Specify AWS profile name to aws-auto-scaling-set-desired-capacity command
Specify region to aws-auto-scaling-set-desired-capacity commandOption validation failed.Specify region to aws-auto-scaling-set-desired-capacity command
Specify group name to aws-auto-scaling-set-desired-capacity command.Option validation failed.Specify group name to aws-auto-scaling-set-desired-capacity command.
Specify capacity to aws-auto-scaling-set-desired-capacity command.Option validation failed.Specify capacity to aws-auto-scaling-set-desired-capacity command.
Specify non-negative capacity number to aws-auto-scaling-set-desired-capacity command.A negative capacity was given.Enter an integer of 0 or more.

Description

Modifies the desired instance count for an AWS Auto Scaling group.

The following AWS IAM permissions must be allowed to use this command.

  • autoscaling:SetDesiredCapacity
Caution
This command changes an AWS resource rather than reading one. The change takes effect as soon as the query runs and is not rolled back automatically.

Examples

Example: Update AWS Auto Scaling Group Capacity

Situation: A detection rule or playbook needs to run update aws auto scaling group capacity.

aws-auto-scaling-set-desired-capacity profile=aws-prod region=ap-northeast-2 name=example-ip-set capacity=2

Expected result:

aws_profileregionnamecapacity
aws-prodap-northeast-2example-name1

Interpretation: One record is the outcome of one request. The command changes an AWS resource, so verify the target identifier and region before running it.