Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When dynamo_db: { api_version: '2012-08-10' }, raise Error from AWS::DynamoDB::Table#load_schema. #327

Closed
takeshinoda opened this issue Aug 12, 2013 · 7 comments
Assignees

Comments

@takeshinoda
Copy link

I want use AWS::DynamoDB::Client::V20120810 . But raised this Error.
When the api_version: '2011-12-05', does not raise Error.

require 'aws-sdk'

AWS.config access_key_id: 'XXXXX',
           secret_access_key: 'xxxxxxxxxxxxxxxxxxx',
           dynamo_db_endpoint: 'dynamodb.ap-northeast-1.amazonaws.com',
           dynamo_db: { api_version: '2012-08-10' }

dynamodb = AWS::DynamoDB.new
table = dynamodb.tables['Tests'] # exsits Tests table.
table.load_schema # => Error

Error:

$ ruby -v
ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-darwin11.4.2]
$ ruby dynamo_db.rb
/Users/takeshi/.rbenv/versions/2.0.0-p247/gemsets/default/gems/aws-sdk-1.14.1/lib/aws/dynamo_db/table.rb:127:in `block in <class:Table>': undefined method `[]' for nil:NilClass (NoMethodError)
        from /Users/takeshi/.rbenv/versions/2.0.0-p247/gemsets/default/gems/aws-sdk-1.14.1/lib/aws/core/resource.rb:381:in `attributes_from_response'
        from /Users/takeshi/.rbenv/versions/2.0.0-p247/gemsets/default/gems/aws-sdk-1.14.1/lib/aws/core/resource.rb:129:in `block in attributes_from_response'
        from /Users/takeshi/.rbenv/versions/2.0.0-p247/gemsets/default/gems/aws-sdk-1.14.1/lib/aws/core/resource.rb:128:in `each'
        from /Users/takeshi/.rbenv/versions/2.0.0-p247/gemsets/default/gems/aws-sdk-1.14.1/lib/aws/core/resource.rb:128:in `attributes_from_response'
        from /Users/takeshi/.rbenv/versions/2.0.0-p247/gemsets/default/gems/aws-sdk-1.14.1/lib/aws/core/cacheable.rb:65:in `retrieve_attribute'
        from /Users/takeshi/.rbenv/versions/2.0.0-p247/gemsets/default/gems/aws-sdk-1.14.1/lib/aws/core/resource.rb:235:in `block in define_attribute_getter'
        from /Users/takeshi/.rbenv/versions/2.0.0-p247/gemsets/default/gems/aws-sdk-1.14.1/lib/aws/dynamo_db/table.rb:231:in `load_schema'
        from dynamo_db.rb:10:in `<main>'
@trevorrowe
Copy link
Member

There is currently a limitation that the higher level abstractions for AWS::DynamoDB will only work with the older API version. Ideally, these interfaces should lock the client API version internally until they could be updated to be compatible with the backwards-incompatible newer API version.

If you are okay using the AWS::DynamoDB::Client class directly then locking the API version will work fine.

I'm going leave this issue open, because the above should work without raising errors, even if it has to drop down to the older API version for now.

@takeshinoda
Copy link
Author

I understood 😃 . Thank you.

@trevorrowe
Copy link
Member

Sorry, closed this accidentally. We still need to do the work outlined above.

@awood45
Copy link
Member

awood45 commented Aug 28, 2013

Going out with the next release.

@awood45 awood45 closed this as completed Aug 28, 2013
@PeterBengtson
Copy link

Any idea when the higher abstractions will use the newer 2012 client in their entirety? It would be a most welcome thing.

@lsegal
Copy link
Contributor

lsegal commented Sep 10, 2013

@PeterBengtson due to our work on V2.0 of the AWS SDK for Ruby, we have no plans to put out new high level abstractions for this version of the SDK. In addition to the new version, we also want to make some significant improvements to the high level APIs to make them more idiomatic and easy to use. If you are interested, we would certainly be happy to look at a pull request that ports over the high level functionality of the DynamoDB client to the new API version.

@PeterBengtson
Copy link

Hi Loren,

Thanks for the reply. I'd like nothing more than to contribute to AWS-SDK for Ruby; however, as I'm currently involved in writing a DynamoDB drop-in replacement for ActiveRecord, and nothing out there seems to use secondary indices due to the lack of higher-level abstractions in the AWS-SDK Ruby gem, I'd rather jump onto the 2.0 bandwagon instead. Any indications on when you expect to release something that would allow us to get going?

The gem is called ocean-dynamo and is part of ocean-rails, an open source project letting people set up Rails SOA:s in the Amazon cloud. (http://wiki.oceanframework.net)

/ Peter Bengtson
  System Architect, Odigeo

10 sep 2013 kl. 03:51 skrev Loren Segal notifications@github.com:

@PeterBengtson due to our work on V2.0 of the AWS SDK for Ruby, we have no plans to put out new high level abstractions for this version of the SDK. In addition to the new version, we also want to make some significant improvements to the high level APIs to make them more idiomatic and easy to use. If you are interested, we would certainly be happy to look at a pull request that ports over the high level functionality of the DynamoDB client to the new API version.


Reply to this email directly or view it on GitHub.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants