I utilise a number of 'throwaway' servers in AWS and we're looking at trying to keep the cost of these down.
Initially, we're looking for a fairly basic 'awsec2 stop all' command to be run on a scheduled basis from a server we do know will be running 24/7.
Upon checking against what AWS have documented, it appears that we need to pull in all the currently running instances, grab the ID's of these and then pass them through into the command, rather than simply stating I want all instances to turn off.
Is there a better method collecting these ID's such as simply being able to issue a 'stop all'?
Appreciate the help.