What is the ec2 cli command to modify the minimum number of nodes in a scaling group?
I'd go with aws autoscaling set-desired-capacity following the documentation

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) to call the related API instead of forking to a system command.