AWS Developer Blog

Tag: ruby

Polling Messages from a Amazon SQS Queue

by Trevor Rowe | on | in Ruby | Permalink | Comments |  Share

We’ve recently added a utility class to the AWS SDK for Ruby that makes it easy to poll an Amazon SQS queue for messages. poller = Aws::SQS::QueuePoller.new(queue_url) poller.poll do |msg| puts msg.body end Messages are automatically deleted from the queue at the end of the block. This tool supports receiving and deleting messages in batches, […]

Read More

Announcing the aws-sdk-rails Gem

by Alex Wood | on | in Ruby | Permalink | Comments |  Share

With the release of V2 of the AWS SDK for Ruby, we’ve received customer feedback asking for support for the Ruby on Rails integration features provided by V1 of the SDK. Today, we’re excited to announce the release of the aws-sdk-rails gem, available now via RubyGems and, of course, on GitHub. To get started, add […]

Read More

Amazon DynamoDB Document API in Ruby (Part 3 – Update Expressions)

by Trevor Rowe | on | in Ruby | Permalink | Comments |  Share

As we showed in previous posts, it’s easy to put JSON items into Amazon DynamoDB, retrieve specific attributes with projection expressions, and fetch only data that meet some criteria with condition expressions. Now, let’s take a look at how we can conditionally modify existing items with Update Expressions. (Note: this code uses the same ProductCatalog […]

Read More

Amazon DynamoDB Document API in Ruby (Part 2 – Condition Expressions)

by Trevor Rowe | on | in Ruby | Permalink | Comments |  Share

As we showed in the previous post, it’s easy to put JSON items into Amazon DynamoDB and retrieve specific attributes with projection expressions. Condition Expressions provide a more flexible and SQL-like way to retrieve only the items you want from DynamoDB. First, let’s put a few more items into DynamoDB using a BatchWriteItem operation. (Note: […]

Read More

Amazon DynamoDB Document API in Ruby (Part 1 – Projection Expressions)

by Trevor Rowe | on | in Ruby | Permalink | Comments |  Share

Amazon DynamoDB launched JSON Document Support along with several improvements to the DynamoDB API. This post is part of a series where we’ll explore these features in more depth with the AWS SDK for Ruby V2. In particular, this post focuses on putting items into DynamoDB using the Ruby SDK and controlling the data we […]

Read More

Announcing V2 of the AWS SDK for Ruby

by Trevor Rowe | on | in Ruby | Permalink | Comments |  Share

I am excited to announce today’s stable release of version 2 of the AWS SDK for Ruby. It is available now as the aws-sdk gem on RubyGems. Features Version 2 of the AWS SDK for Ruby, the aws-sdk gem, provides a number of powerful features for developers including: Support for 40+ services Resource interfaces for […]

Read More

Upcoming Stable Release of AWS SDK for Ruby – Version 2

by Trevor Rowe | on | in Ruby | Permalink | Comments |  Share

We plan to release version 2 of the AWS SDK for Ruby next week. We will remove the preview flag from the 2.0 version of aws-sdk. Specify Your Version Dependencies The AWS SDK for Ruby uses semantic versioning. Updates within version 1 are backwards compatible. Version 2 of the aws-sdk gem is not backwards compatible. […]

Read More

Using Amazon RDS with Ruby on Rails and AWS OpsWorks

by Alex Wood | on | in Ruby | Permalink | Comments |  Share

Earlier in this blog series, we showed you how to deploy a Ruby on Rails application to Amazon Web Services using AWS OpsWorks. In that example, we used an OpsWorks-managed MySQL database run on an Amazon EC2 instance. One common piece of feedback on that post was a desire to see how you can set […]

Read More

AWS re:Invent 2014 Ruby Recap

by Alex Wood | on | in Ruby | Permalink | Comments |  Share

Last week, we had a great time meeting with AWS customers using Ruby at AWS re:Invent! We appreciate the feedback we received, and the discussions that we had with you. AWS SDK for Ruby Presentation Notes At AWS re:Invent this year I took many of you on a tour of version 2 of the AWS […]

Read More

Client Response Stubs

by Trevor Rowe | on | in Ruby | Permalink | Comments |  Share

We recently added client response stubs to the aws-sdk-core gem. Response stubbing disables network traffic and causes a client to return fake or stubbed data. # no API calls are made s3 = Aws::S3::Client.new(stub_responses: true) s3.list_buckets.buckets.map(&:name) #=> [] Custom Response Data By default, stubbed responses return empty lists, empty maps, and placeholder scalars. These empty […]

Read More