Created
May 27, 2010 20:59
-
-
Save joeyAghion/416343 to your computer and use it in GitHub Desktop.
This file contains 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 characters
# $ 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