Last active
December 14, 2015 09:19
-
-
Save pixelpogo/5064183 to your computer and use it in GitHub Desktop.
Revisions
-
pixelpogo renamed this gist
Mar 1, 2013 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
pixelpogo created this gist
Mar 1, 2013 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,31 @@ require "rubygems" require "aws-sdk" require "hirb" extend Hirb::Console ec2 = AWS::EC2.new( :access_key_id => 'YOUR_ACCESS_KEY_ID', :secret_access_key => 'YOUR_SECRET_ACCESS_KEY') instances = [] ec2.regions.each do |region| print "\r\e[0KLooking for instances in #{region.name}..." $stdout.flush region.instances.each do |i| instances << { :id => i.id, :ip => i.ip_address, :private_ip => i.private_ip_address, :dns => i.dns_name, :status => i.status, :region => region.name, :type => i.instance_type } end end print "\r\e[0K" $stdout.flush table instances