Requirements:
- aws-sdk:
~> 1.20.0
Two files are required: ~/.aws/config
and a file containing instances ids, one per line, eg:
~/.aws/config
[default]
aws_access_key_id=AKIAF06E7MXBSH9DHM02
aws_secret_access_key=kWcrlUX5JEDGM/LtmEENI/aVmYvHNif5zB+d9+ct
region=us-east-1
[cluster]
aws_access_key_id=AKIA4DAD763960B530FA
aws_secret_access_key=kof1RHSpNWAaoWb52LLXCak5N8ycQsiOoOCajq5D
region=sa-east-1
The defined variables are straightforward, and the name between brackets are for multiple key pairs.
instances.txt
i-1a40b6e3
i-ccf8a6bf
i-fdb5a545
Sample execution:
$ ruby script.rb -i ~/instances.txt --start