AWS SDK for Ruby Updated
Amazon Web Services Inc. (AWS) announced the software development kit (SDK) for the Ruby programming language has been updated to version 2 with numerous enhancements.
Highlighting the new AWS SDK for Ruby is support for more than 40 AWS services, such as CodeDeploy, Storage Gateway, Amazon CloudSearch and so on.
Company exec Jeff Barr detailed the new features in a blog post:
- Resource interfaces for seven services. These are being published as preview releases.
- Client response stubs. These disable network traffic and cause clients to return fake or stubbed data.
- Waiters. These pattern abstractions facilitate AWS API polling until a target state is achieved.
- Response paging. To help improve user access to AWS from client abstractions, these provide full response paging from a client interface.
- Improved parameter validation. The SDK can now aggregate all validation errors and raise them in a single pass.
- Flexible Gem dependencies. The v2 SDK depends on multi_json and multi_xml gems, while v1 depends on Nokogiri and JSON.
- Structured response data. While in v1, low-level clients had to accept a hash of request parameters and returned the data as a hash, the new version uses descriptions about the whole response structure to create Ruby Struct objects.
- Improved API reference documentation (including examples). The enhanced API docs can be found here.
Also, Barr said, "Versions 1 and 2 of the SDK use distinct namespaces. This allows you to use both of them in the same application without making any changes to your existing code."
Developers can now install the aws-sdk gem from RubyGems.
David Ramel is the editor of Visual Studio Magazine.