Latest Version
Download the latest version of the AWS SDK for Ruby:
gem install aws-sdk
New Features
| Change | Description |
|---|---|
| AWS::DynamoDB::BatchWrite |
Added support for the BatchWriteItem operation. You can build a batch with a mixture of puts and deletes for one or more tables. # sharding data across multiple tables
items = [
{ :id => 'id1', :color => 'red' },
{ :id => 'id2', :color => 'blue' },
{ :id => 'id3', :color => 'green' },
]
batch = AWS::DynamoDB::BatchWrite.new
batch.put('table-a', items)
batch.put('table-b', items)
batch.process!
# delete an item and its "dependencies" from another table
batch = AWS::DynamoDB::BatchWrite.new
batch.delete('hash-table', 'hk-1') # hash-key-only table
batch.delete('range-table', [['hk-1', 'rk-1'], ['hk-1', 'rk-2']]) # hash and range key table
batch.process!
# mixing put and deletes
batch = AWS::DynamoDB::BatchWrite.new
batch.put('table1', [{ :id => 1, :value => 2}])
batch.put('table2', [{ :id => 1, :value => 2}])
batch.delete('table3', %w(1 2 3 4))
batch.process!
Additional helper methods have been added to the AWS::DynamoDB and AWS::DynamoDB::Table classes for writing items in a batch. |
Supported API Versions
This release of the SDK supports the following API versions:
| Service | API Version |
|---|---|
| Amazon DynamoDB | 2011-12-05 |
| Amazon Elastic Compute Cloud | 2011-12-15 |
| Amazon Simple E-mail Service | 2010-12-01 |
| Amazon Simple Notifications Service | 2010-03-31 |
| Amazon Simple Queue Service | 2011-10-01 |
| Amazon Simple Storage Service | 2006-03-01 |
| Amazon Simple Workflow Service | 2012-01-25 |
| Amazon SimpleDB | 2009-04-15 |
| Auto Scaling | 2011-01-01 |
| AWS CloudFormation | 2010-05-15 |
| AWS Identity and Access Management | 2010-05-08 |
| AWS Security Token Service | 2011-06-15 |
| Elastic Load Balancing | 2011-08-15 |