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…