2回答
- 新しい順
- 投票が多い順
- コメントが多い順
2
There is no single API to stop all the running instances. You need to get the list of running instance using the describe_instances
API. You can use the instance-state-name
filter to get only the running
instances. Once you have the result, you can extract the instance IDs, place them in an array and call the stop_instances
API as you did before.
1
There is also a Solution for stopping instances on a schedule if that is what you are working on. Instance Scheduler on AWS
Thanks so much, will give this a go