I'm using aws-sdk gem, I can't figure how to list all the running ec2 instances and load them to a database.
I need an approach on how to do it.
I'm using aws-sdk gem, I can't figure how to list all the running ec2 instances and load them to a database.
I need an approach on how to do it.
Install the AWS ClI and run the following to get a list of running instance ids:
http://docs.amazonwebservices.com/AWSRubySDK/latest/frames.html
The answer above will return all instances, not just running instances. You can use a filter to get only running instances: