<p>I'd go with <code>aws autoscaling set-desired-capacity</code> following the <a href="http://docs.aws.amazon.com/autoscaling/latest/userguide/as-manual-scaling.html#as-manual-scaling-aws-cli" rel="nofollow noreferrer">documentation</a></p>

<p>But if you're up to make a button you should look into the various <a href="https://aws.amazon.com/documentation/" rel="nofollow noreferrer">AWS sdk (on top right is the list of them)</a> to call the <a href="https://docs.aws.amazon.com/AutoScaling/latest/APIReference/API_SetDesiredCapacity.html" rel="nofollow noreferrer">related API</a> instead of forking to a system command.</p>

CC BY-SA 3.0
2017-06-01T11:59:04.167Z
2017-06-01T11:59:04.167Z
Tensibai
<p>I've got an <a href="https://en.wikipedia.org/wiki/Amazon_Elastic_Compute_Cloud" rel="nofollow noreferrer">ec2</a> <a href="https://en.wikipedia.org/wiki/Autoscaling#Amazon_Web_Services_.28AWS.29" rel="nofollow noreferrer">autoscaling</a> group that starts in the morning and finishes in the evening. I'd like to create a 'button' that people can click to warm up the autoscaling group to run jobs in the middle of the night (only on an on-demand basis). </p>

<p>My question is: <strong>What is the ec2 <a href="https://aws.amazon.com/cli/" rel="nofollow noreferrer">cli</a> command to modify the minimum number of nodes in a scaling group?</strong></p>

<amazon-ec2><autoscaling><aws-cli>
What is the ec2 cli command to modify the minimum number of nodes in a scaling group?
hawkeye
# What is the ec2 cli command to modify the minimum number of nodes in a scaling group?

(Asked by: username_0 on 2017-06-01)

I've got an [ec2](https://en.wikipedia.org/wiki/Amazon_Elastic_Compute_Cloud) [autoscaling](https://en.wikipedia.org/wiki/Autoscaling#Amazon_Web_Services_.28AWS.29) group that starts in the morning and finishes in the evening. I'd like to create a 'button' that people can click to warm up the autoscaling group to run jobs in the middle of the night (only on an on-demand basis).

My question is: **What is the ec2 [cli](https://aws.amazon.com/cli/) command to modify the minimum number of nodes in a scaling group?**

**Tags:** amazon-ec2, autoscaling, aws-cli


---

## 1 answers

### Answer by username_1 on 2017-06-01. Score: 0 | Accepted answer

I'd go with `aws autoscaling set-desired-capacity` following the [documentation](http://docs.aws.amazon.com/autoscaling/latest/userguide/as-manual-scaling.html#as-manual-scaling-aws-cli)

But if you're up to make a button you should look into the various [AWS sdk (on top right is the list of them)](https://aws.amazon.com/documentation/) to call the [related API](https://docs.aws.amazon.com/AutoScaling/latest/APIReference/API_SetDesiredCapacity.html) instead of forking to a system command.


---

