Skip to content

Instantly share code, notes, and snippets.

@ardeearam
Last active August 29, 2015 14:15
Show Gist options
  • Save ardeearam/f579a1392b4ddfb65e8f to your computer and use it in GitHub Desktop.
Save ardeearam/f579a1392b4ddfb65e8f to your computer and use it in GitHub Desktop.
# This is how to iterate over Amzon SDK version 2.
# Notice that the actual data is contained inside the "data" method.
# This is the one that got me, and this is not documented anywhere.
sqs = Aws::SQS::Client.new(region: 'ap-southeast-1')
output =""
sqs.list_queues.each do |response|
output += response.data.to_json + "\n"
end
puts output
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment