Note to self regarding Fog & AWS
So I’ve been using fog, a ruby library, to try and write a fairly slick deployment UI for my client. The documentation occasionally suffers from a lack of examples or explanation though, so I decided to write this down in case someone else has similar problems.
If you want to filter servers, don’t try to look at the method implementation or whatever. You’ll merely be frustrated. Instead, use Amazon’s documentation to figure out how to use it. Obligatory demo:
c = Fog::Compute.new({:provider => 'AWS',
:aws_access_key_id => id,
:aws_secret_access_key => secret})
results = c.servers.all({'tag:Name' => name, 'instance-state-name' => 'running'})
Maybe Google will pick this up, and save someone else 45 minutes of trying to figure out where the rubber met the road.