Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save joeyAghion/416343 to your computer and use it in GitHub Desktop.
Save joeyAghion/416343 to your computer and use it in GitHub Desktop.
# $ cloud console
> type = 'm1.large'; days=30; y AWS::EC2::Base.new(:access_key_id => ENV['EC2_ACCESS_KEY'], :secret_access_key => ENV['EC2_SECRET_KEY']).describe_spot_price_history(:instance_type => type, :product_description => "Linux/UNIX", :start_time => Time.now - 60*60*24*days)['spotPriceHistorySet']['item'].inject({}){|result, hash| result[hash['timestamp']] = hash['spotPrice']; result }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment