amazon web services - Terminating instance with AWS auto scaling? -
i have no problem spinning instance using time scheduling feature of aws auto scale:
as-put-scheduled-update-group-action start --auto-scaling-group myasg --min-size 1 --max-size 1 --recurrence "20 15 * * *" but when try , schedule instance terminated, nothing happens:
as-put-scheduled-update-group-action stop --auto-scaling-group myasg --min-size 0 --max-size 0 --recurrence "50 15 * * *" where going wrong?
thanks steffen. delay wasn't issue, might have been case of me trying more 4 schedules in 1 day though! completeness, these steps necessary spin 1 instance , take down few minutes later:
as-create-launch-config mylc --image-id ami-f2191786 --instance-type t1.micro as-create-auto-scaling-group myasg --launch-configuration mylc --availability-zones eu-west-1a --min-size 0 --max-size 1 as-put-scheduled-update-group-action start --auto-scaling-group myasg --min-size 1 --max-size 1 --desired-capacity 1 --recurrence "16 10 7 5 2" as-put-scheduled-update-group-action stop --auto-scaling-group myasg --min-size 0 --max-size 0 --desired-capacity 0 --recurrence "2 10 7 5 2"
your auto scaling usage such correct: while respective example scale based on schedule using --desired-capacity parameter rather adjusting --max-size (see section create schedule scaling actions), should work regardless indeed - i've replayed example ensure , works fine me.
maybe experiencing implied api delays, see section programming considerations scheduled actions:
- a scheduled action executes within seconds. however, action may delayed 2 minutes scheduled start time. because auto scaling executes actions within auto scaling group in order specified, scheduled actions scheduled start times close each other may take longer execute. [emphasis mine]
in regard it's worth noting scheduled action has been visible within seconds via as-describe-scaling-activities --auto-scaling-group myasg indeed, ongoing termination of instance became visible ~30 seconds later in case, might want check via api/cli see whether action executed - accordingly approach see details errors might have happened in case.
Comments
Post a Comment