Search code examples
ruby-on-railsruby-on-rails-4fog

getting some difficulty to populate all servers from all regions with fog


I am using fog to manage all the instance from amazon,i have tried fog without the region, but the default region of fog is us-east. Is there a way to get the server list from all regions?

like this

compute = Fog::Compute.new(  
:provider => :aws,  
:aws_secret_access_key => ACCESS_SECRET,  
:aws_access_key_id => SECRET_KEY  
)  

Solution

  • Unfortunately AWS doesn't provide this info directly. Your best bet would be to simply iterate over the regions and check the servers on each in turn.