title: Polling Amazon SQS Queue with Ruby
body: <p>The Amazon SDK for Ruby changes frequently, the current version of the <code>aws-sdk</code> Ruby gem is <a href="https://rubygems.org/gems/aws-sdk" rel="nofollow">2.0.29</a>. The <a href="http://docs.aws.amazon.com/AWSRubySDK/latest/AWS/SQS/Queue.html" rel="nofollow">old method</a> of polling Amazon SQS messages is no longer valid</p>
  
  <pre><code># polling SQS Queue
  queue.poll do |msg|
    puts "Got message: #{msg.body}"
  end
  </code></pre>
  
  <p>What is the correct method now for the version 2.0 of the <a href="https://github.com/aws/aws-sdk-ruby" rel="nofollow">AWS SDK for Ruby</a>?</p>