Using Amazon’s Web Services from Ruby - Jonathan Younger

March 28th, 2008 No Comments

Right Scale has a great gem:
gem install right_aws
RightScale RightAws::Sqs
RightScale RightAws::Ec2
They will automatically retry errors for you.
gem install kato
Kato - EC2 Pool Manager

require ‘rubygems’
requrie ‘right_aws’
RightAws::RightAWSParser.xml_lib = ‘libxml’
SQS = RightAws::Sqs.new(access_id, access_key) #get an SQS object
queue = SQS.queue(”name_of_queue”) #create a or get a reference to an existing queue
queue.psuh “put message in the queue” #8k max
queue.size # get an [...]

Tags:   · · · · · ·