2 réponses
- Le plus récent
- Le plus de votes
- La plupart des commentaires
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
Contenus pertinents
- demandé il y a un an
- demandé il y a un an
- demandé il y a 4 mois
- AWS OFFICIELA mis à jour il y a 4 mois
- AWS OFFICIELA mis à jour il y a 5 ans
Thanks so much, will give this a go