Giter VIP home page Giter VIP logo

aws-sdk-core-ruby's Introduction

AWS SDK for Ruby - V2

With the stable version 2 release of the AWS SDK for Ruby, this repository has moved to the master branch of aws/aws-sdk-ruby. Please report issues and send pull requests against that repo.

aws-sdk-core-ruby's People

Contributors

aabes avatar adamnbowen avatar alex88 avatar awood45 avatar bbrowning avatar billgathen avatar dpassage avatar drewrothstein avatar friedmag avatar gitter-badger avatar jamesls avatar jcxplorer avatar joshk avatar ktheory avatar lsegal avatar sorah avatar teeparham avatar trevorrowe avatar vayan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aws-sdk-core-ruby's Issues

region shouldn't be required when directly specifying the endpoint

Configuring the endpoint directly but not configuring the region results in an Aws::Errors::MissingRegionError exception when instantiating a new Aws::S3 instance. I could be wrong but I don't think region is used for anything when the user directly specifies the endpoint. If that is correct, then it should only be required if endpoint is not specified.

One can get around this by setting region to anything but that's obviously not desirable.

Client helper methods added to all classes

The gem appears to be giving client class methods to all the classes in a Rails app.

For example:

2.1.1 :015 > Match.s3
 => #<Aws::S3::V20060301> 
2.1.1 :014 > FbGraph.dynamodb
 => #<Aws::DynamoDB::V20120810> 

Aws.s3.get_bucket_policy fails on buckets with '_' (underscores) in their name due to a signature mismatch

When making get_bucket_policy queries against buckets with names containing underscores, I get the following error about the request signature. This may be similar to issue #19 (#19).

Error Sample:

Bucket Name: underscore_bucket <--- this is my own output msg

<Aws::S3::Errors::SignatureDoesNotMatch: The request signature we calculated does not match the signature you provided. Check your key and signing method.>

The request signature we calculated does not match the signature you provided. Check your key and signing method.
/var/lib/gems/1.9.1/gems/aws-sdk-core-2.0.0.rc2/vendor/seahorse/lib/seahorse/client/plugins/raise_response_errors.rb:15:in call' /var/lib/gems/1.9.1/gems/aws-sdk-core-2.0.0.rc2/vendor/seahorse/lib/seahorse/client/plugins/param_conversion.rb:22:incall'
/var/lib/gems/1.9.1/gems/aws-sdk-core-2.0.0.rc2/vendor/seahorse/lib/seahorse/client/request.rb:56:in send_request' /var/lib/gems/1.9.1/gems/aws-sdk-core-2.0.0.rc2/vendor/seahorse/lib/seahorse/client/plugins/operation_methods.rb:40:inblock (2 levels) in add_operation_helpers'
s14.rb:19:in block in <main>' s14.rb:15:ineach'
s14.rb:15:in `

'

That's the error I get on any bucket with an underscore in the name. Here's the code to trigger it (pretty basic):

require 'aws-sdk-core'
begin
bucket_policy = Aws.s3.get_bucket_policy(:bucket=>"UNDERSCORE BUCKET GOES HERE")
rescue
puts $!.inspect
else
puts "Bucket Policy: #{bucket_policy[:policy]}"
end

Upgrade builder dependency to ~> 3.0 (Rails compatibility)

Rails 3.2.14 & 4 (activemodel / actionpack) depends on builder ~> 3.0.0, which conflicts to aws-sdk-core-ruby (builder ~> 2.0.0), which makes this gem couldn't be used with Rails.

I tried to fork this gem and edited the gemspec dependency but rake test raises errors.

Any idea?

Aws::Errors::MissingCredentialsError on Elastic Beanstalk

I'm using the default "credentials from environment variables" behavior for my Sinatra application, which works great from my local machine, but after pushing to Elastic Beanstalk I got an Aws::Errors::MissingRegionError from aws/plugins/regional_endpoint.rb:32.

When I supply the AWS_REGION variable in the console via Configuration -> Software Configuration -> Environment Properties (I think I could tweak my .elasticbeanstalk/optionsettings.<application>-env file to achieve the same result), the error switches to Aws::Errors::MissingCredentialsError on aws/plugins/credentials.rb:42. If I explicitly add the access key and secret key using the console, the error remains the same.

After reviewing the code, I thought it could be the AWS_SESSION_TOKEN that's missing, but in aws/credentials.rb it defaults to nil and isn't included in the set? logic.

I think this means my access and secret keys are not being passed in, either automatically or explicitly, though it does get the explicit region variable. Any suggestions?

S3GetBucketLocationFix doesn't work with nokogiri

Hello,

I have the following response from S3 API:

2.0.0-p195 :052 > r.http_response.body_contents
 => "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<LocationConstraint xmlns=\"http://s3.amazonaws.com/doc/2006-03-01/\">us-west-1</LocationConstraint>" 

When I'm trying to parse with different parsers:

2.0.0-p195 :053 > MultiXml.parser = :rexml
 => :rexml 
2.0.0-p195 :054 > xml = MultiXml.parse(r.http_response.body_contents)['LocationConstraint']
 => {"xmlns"=>"http://s3.amazonaws.com/doc/2006-03-01/", "__content__"=>"us-west-1"} 
2.0.0-p195 :055 > MultiXml.parser = :nokogiri
 => :nokogiri 
2.0.0-p195 :056 > xml = MultiXml.parse(r.http_response.body_contents)['LocationConstraint']
 => "us-west-1" 

https://github.com/aws/aws-sdk-core-ruby/blob/4d5c16d1264119583b96ef555d91562a49249f56/lib/aws/plugins/s3_get_bucket_location_fix.rb#L11 assumes it's REXML.

With nokogiri it returns "" (empty string) all the time, because there's no __content__ in the string.

Cheers,

Functional equivalent of "list_access_keys" for root account needed

Can we get support either in IAM describe_account_summary or a STS-supported version of IAM list_access_keys that returns the number of API keys assigned to the root account?

Right now, there is no visible way to detect API keys being present on an aws root account that I can find. I believe this worked previously before SDKs started contextually interpreting the caller of the API to provide specific results.

Incorrect S3 signature generated with path style requests

Aws::Signers::S3#canonicalized_resource does not generate the correct canonicalized resource when using path style requests. Virtual-hosted style requests appear to be fine.

The problem is in the first if statement. Somewhere in there, it needs to check if the request is a path-style request and if so, not to add anything to "parts". aws-sdk version 1.x does this by checking "!path_style?".

edit: I've only noticed this error when creating a bucket although any request that has the bucket name in the URL's path will most likely fail. "list buckets" requests generate the correct signature.

Support for new EMR API

I am validating the new sdk for a project using EMR. I noticed that the new high performance API's for EMR are not supported yet. Using the builtin pagination would be nice for the new list_* actions.

Error when querying buckets for policies via Aws.s3.get_bucket_policy -- "#<MultiXml::ParseError: Start tag expected, '<' not found>"

I have a number of buckets with no policies attached. When I try to iterate through an array of those buckets and pass each to the get_bucket_policy call, I get a variety of responses. The three so far are:

<Aws::S3::Errors::SignatureDoesNotMatch: The request signature we calculated does not match the signature you provided. Check your key and signing method.> --> See issue #31.

<Aws::S3::Errors::NoSuchBucketPolicy: The bucket policy does not exist> --> to be expected when no policy has been set/created for a bucket

(and the error I'm creating this issue for)

<MultiXml::ParseError: Start tag expected, '<' not found> --> which happens to 5 of the 13 buckets I check with that call.

It seems like this is an error inside the ruby s3 client in the sdk parsing the XML response behind the scenes... Reach out if you need a read key to test this against our dev account if you cannot reproduce.

Code:

buckets.each do
|bucket|
puts "Bucket Name: #{bucket}"
begin
bucket_policy = Aws.s3.get_bucket_policy(:bucket=>bucket)
rescue
puts $!, $@
else
puts "Bucket Policy: #{bucket_policy[:policy]}"
end
end

Error Message:

Bucket Name: evident-test

<MultiXml::ParseError: Start tag expected, '<' not found>

/var/lib/gems/1.9.1/gems/multi_xml-0.5.5/lib/multi_xml/parsers/nokogiri.rb:15:in parse' /var/lib/gems/1.9.1/gems/multi_xml-0.5.5/lib/multi_xml.rb:138:inparse'
/var/lib/gems/1.9.1/gems/aws-sdk-core-2.0.0.rc2/lib/aws/xml/parser.rb:17:in parse' /var/lib/gems/1.9.1/gems/aws-sdk-core-2.0.0.rc2/lib/aws/response_handler.rb:34:inparse'
/var/lib/gems/1.9.1/gems/aws-sdk-core-2.0.0.rc2/lib/aws/response_handler.rb:29:in parse_payload' /var/lib/gems/1.9.1/gems/aws-sdk-core-2.0.0.rc2/lib/aws/response_handler.rb:17:inblock in call'
/var/lib/gems/1.9.1/gems/aws-sdk-core-2.0.0.rc2/vendor/seahorse/lib/seahorse/client/response.rb:41:in on_status' /var/lib/gems/1.9.1/gems/aws-sdk-core-2.0.0.rc2/vendor/seahorse/lib/seahorse/client/response.rb:54:inon_success'
/var/lib/gems/1.9.1/gems/aws-sdk-core-2.0.0.rc2/lib/aws/response_handler.rb:12:in call' /var/lib/gems/1.9.1/gems/aws-sdk-core-2.0.0.rc2/lib/aws/request_handler.rb:14:incall'
/var/lib/gems/1.9.1/gems/aws-sdk-core-2.0.0.rc2/lib/aws/plugins/user_agent.rb:12:in call' /var/lib/gems/1.9.1/gems/aws-sdk-core-2.0.0.rc2/vendor/seahorse/lib/seahorse/client/plugins/restful_bindings.rb:13:incall'
/var/lib/gems/1.9.1/gems/aws-sdk-core-2.0.0.rc2/vendor/seahorse/lib/seahorse/client/plugins/endpoint.rb:27:in call' /var/lib/gems/1.9.1/gems/aws-sdk-core-2.0.0.rc2/vendor/seahorse/lib/seahorse/client/plugins/param_validation.rb:22:incall'
/var/lib/gems/1.9.1/gems/aws-sdk-core-2.0.0.rc2/vendor/seahorse/lib/seahorse/client/plugins/raise_response_errors.rb:14:in call' /var/lib/gems/1.9.1/gems/aws-sdk-core-2.0.0.rc2/vendor/seahorse/lib/seahorse/client/plugins/param_conversion.rb:22:incall'
/var/lib/gems/1.9.1/gems/aws-sdk-core-2.0.0.rc2/vendor/seahorse/lib/seahorse/client/request.rb:56:in send_request' /var/lib/gems/1.9.1/gems/aws-sdk-core-2.0.0.rc2/vendor/seahorse/lib/seahorse/client/plugins/operation_methods.rb:40:inblock (2 levels) in add_operation_helpers'
s14.rb:19:in block in <main>' s14.rb:15:ineach'
s14.rb:15:in `

'

Documentaion for "target" in get_object method is missing

In order to download a file from S3, the code should be like below:

resp = s3.get_object({ 
        bucket:'bucket-name', 
        key:'object-key' 
        }, 
        target: '/path/to/file'
)

This will download the file from S3 to the path specified. However, there is no documentation on usage of target in Ruby SDK core Documentation.

Above code was pulled from: https://forums.aws.amazon.com/thread.jspa?threadID=151701&tstart=0

Could you please update the documentation with details for target. Downloading files form S3 is probably the most common task anyone would like to do and this cannot be done without using target. The functionality is there, but the documentation is missing.

Thanks.

associate_public_ip_address=true errs when security_group_ids is String

During creation of a startup script for our EC2 fleet I came across a curious bug.

When I specify security_group_ids as String (there's only one) and add associate_public_ip_address (set to true) then ec2.instance.create errs on me with:

.../gems/aws-sdk-1.28.1/lib/aws/core/option_grammar.rb:240:in `validate': expected enumerable value for key groups of member 1 of option network_interfaces (AWS::Core::OptionGrammar::FormatError)

Changing security_group_ids to Array (with one element) succeeds.

This is a bug because documentation clearly states:

Security groups are used to determine network access rules for the instances. :security_group_ids accepts a single ID or an array of security group IDs

To reproduce:

gem 'aws-sdk', '~> 1.0'
require 'aws'
require 'aws/ec2'

ec2 = AWS.ec2
i = ec2.instances.create(
    image_id: '...',
    subnet: '...',
    instance_type: 'm1.xlarge',
    user_data: '...',
    security_group_ids: '...', # change this to ['...'] to make it work
    key_name: '...',
    private_ip_address: '...',
    associate_public_ip_address: true,
)

(although I've blanked out the actual values to protect the innocent)

Glacier multipart upload fails with InvalidParameterValueException

Trying to implement a Glacier multipart upload feature in a Rails 3.0/Ruby 1.9.3 application using the new aws-sdk-core rc2.

It seems I'm able to initiate the multipart upload successfully, I get a upload_id returned in the response from AWS.

It seems I'm also able to upload parts using the upload_multipart_part method, with or without a tree hash checksum supplied as an argument. The responses from AWS include a checksum SHA256 hash which matches the ones I calculate locally.

But when I try to call complete_multipart_upload, I get an error:

Aws::Glacier::Errors::InvalidParameterValueException
Invalid x-amz-sha256-tree-hash: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855

No matter what file or what file size or what chunk size I use, I get the exact same error. I looked at the hash in the error and it is the hash created by an empty value when using the OpenSSL::Digest::Digest.new('sha256') method. So am I wrong or is AWS calculating a tree hash based on an empty file?

I tried sending my own computed tree hash in the complete_multipart_upload method arguments, but per parts of documentation, this is not an option, the tree hash gets calculated by AWS automatically on the server side.

Ruby SDK Support for Workspaces

Hi Trevor,

Since Workspaces went GA on 3/26/14, can we expect a client in the near future? I have immediate need for the ruby version of the SDK interface to Workspaces.

Thanks!

IAM list_access_keys() doesn't respect :user_name parameter when passed

The docs say:

"Calls the ListAccessKeys operation.
Returns information about the access key IDs associated with the specified user. If there are none, the action returns an empty list.

Although each user is limited to a small number of keys, you can still paginate the results using the MaxItems and Marker parameters.

If the UserName field is not specified, the UserName is determined implicitly based on the AWS access key ID used to sign the request. Because this action works for access keys under the AWS account, this API can be used to manage root credentials even if the AWS account has no associated users."

When we specify :user_name as a known user, we get back the keys for the first alphabetical user in the account. The query is being made via assume_role of a role with permissions to IAM. It looks like the sdk or the query api gives us back the contextual response (of who is calling, in this case the role and thus defaults to the first user it finds) versus the anticipated response.

no tagset results in an error for get_bucket_tagging, not a nil tagset

I expected when making this call without a tag on a bucket-
@s3.get_bucket_tagging(:bucket => 'my_bucket')

That it would return a nil tagset, not that it would throw this error-
Aws::S3::Errors::NoSuchTagSet: The TagSet does not exist

Happy to rescue errors but I would much rather have it return a nil tagset in this case.

Could not find gem 'aws-sdk-core

Hi

Following the README I added:

gem 'aws-sdk-core', '~> 2.0'

in my Gemfile then bundle install:

Could not find gem 'aws-sdk-core (~> 2.0) java' in the gems available on this machine

It works with gem 'aws-sdk-core', '~> 2.0.0.rc8'

NameError: wrong constant name 500Error

Another:

NameError: wrong constant name 500Error
File "org/jruby/RubyModule.java" line 2634 in const_set
File "/home/releases/vendor/bundle/jruby/1.9/gems/aws-sdk-core-2.0.0.rc8/lib/aws/errors.rb" line 92 in set_error_constant
File "org/jruby/ext/thread/Mutex.java" line 149 in synchronize
File "/home/releases/vendor/bundle/jruby/1.9/gems/aws-sdk-core-2.0.0.rc8/lib/aws/errors.rb" line 87 in set_error_constant
File "/home/releases/vendor/bundle/jruby/1.9/gems/aws-sdk-core-2.0.0.rc8/lib/aws/errors.rb" line 80 in error_class
File "/home/releases/vendor/bundle/jruby/1.9/gems/aws-sdk-core-2.0.0.rc8/lib/aws/error_handler.rb" line 29 in error
File "/home/releases/vendor/bundle/jruby/1.9/gems/aws-sdk-core-2.0.0.rc8/lib/aws/error_handler.rb" line 19 in call
File "/home/releases/vendor/bundle/jruby/1.9/gems/aws-sdk-core-2.0.0.rc8/vendor/seahorse/lib/seahorse/client/response.rb" line 36 in on
File "/home/releases/vendor/bundle/jruby/1.9/gems/aws-sdk-core-2.0.0.rc8/lib/aws/error_handler.rb" line 12 in call
File "/home/releases/vendor/bundle/jruby/1.9/gems/aws-sdk-core-2.0.0.rc8/lib/aws/plugins/retry_errors.rb" line 78 in call
File "/home/releases/vendor/bundle/jruby/1.9/gems/aws-sdk-core-2.0.0.rc8/lib/aws/response_handler.rb" line 12 in call
File "/home/releases/vendor/bundle/jruby/1.9/gems/aws-sdk-core-2.0.0.rc8/lib/aws/request_handler.rb" line 14 in call
File "/home/releases/vendor/bundle/jruby/1.9/gems/aws-sdk-core-2.0.0.rc8/lib/aws/plugins/response_paging.rb" line 9 in call
File "/home/releases/vendor/bundle/jruby/1.9/gems/aws-sdk-core-2.0.0.rc8/lib/aws/plugins/user_agent.rb" line 12 in call
File "/home/releases/vendor/bundle/jruby/1.9/gems/aws-sdk-core-2.0.0.rc8/vendor/seahorse/lib/seahorse/client/plugins/restful_bindings.rb" line 13 in call
File "/home/releases/vendor/bundle/jruby/1.9/gems/aws-sdk-core-2.0.0.rc8/vendor/seahorse/lib/seahorse/client/plugins/endpoint.rb" line 27 in call
File "/home/releases/vendor/bundle/jruby/1.9/gems/aws-sdk-core-2.0.0.rc8/vendor/seahorse/lib/seahorse/client/plugins/param_validation.rb" line 22 in call
File "/home/releases/vendor/bundle/jruby/1.9/gems/aws-sdk-core-2.0.0.rc8/vendor/seahorse/lib/seahorse/client/plugins/raise_response_errors.rb" line 14 in call
File "/home/releases/vendor/bundle/jruby/1.9/gems/aws-sdk-core-2.0.0.rc8/vendor/seahorse/lib/seahorse/client/plugins/param_conversion.rb" line 22 in call
File "/home/releases/vendor/bundle/jruby/1.9/gems/aws-sdk-core-2.0.0.rc8/vendor/seahorse/lib/seahorse/client/request.rb" line 70 in send_request
File "/home/releases/vendor/bundle/jruby/1.9/gems/aws-sdk-core-2.0.0.rc8/vendor/seahorse/lib/seahorse/client/plugins/operation_methods.rb" line 42 in describe_cache_clusters

Thread safety problems?

I have created a heavily threaded test rig to try and point out what I think are thread-safety problems in aws-sdk-core. Before diving too far into investigation I wanted to throw this a bit wider to see if I'm missing something.

These tests were carried out in the following environment:

$ uname -a
Linux myitcv-virtual-machine 3.11.0-17-generic #31-Ubuntu SMP Mon Feb 3 21:52:43 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
$ ruby -v
rubinius 2.2.5 (2.1.0 e543ba32 2014-02-08 JI) [x86_64-linux-gnu]
$ lscpu
Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                4
On-line CPU(s) list:   0-3
Thread(s) per core:    1
Core(s) per socket:    1
Socket(s):             4
NUMA node(s):          1
Vendor ID:             GenuineIntel
CPU family:            6
Model:                 70
Stepping:              1
CPU MHz:               2594.193
BogoMIPS:              5188.38
Hypervisor vendor:     VMware
Virtualisation type:   full
L1d cache:             32K
L1i cache:             32K
L2 cache:              256K
L3 cache:              6144K
L4 cache:              131072K
NUMA node0 CPU(s):     0-3

Source code for v1 of the test rig and the accompanying Gemfile behind those links. bundle install to get up and running.

The reason for using celluloid is that we are building a process atop celluloid hence the test is more fair (but admittedly not fully stripped back to bare Ruby/Rubinius)

  • access_key_id etc will need to be populated before using test.rb
  • The code creates a pool of 50 threads, then makes 100 async calls into that pool
  • Each call makes a call to DynamoDB to list tables
  • After bundle install, ruby test.rb (assuming you have the right Ruby interpreter set via rbenv etc) should be enough
  • Yes, this line could be made more efficient but leaving it as such makes the thread safety problem more apparent (see later discussion about a revised versions v2 and v3)

This should be as vanilla as it gets, yet there are three types of exception I've been hitting. But not consistently which is what leads me to believe there's a thread safety issue. They are:

  1. Unrecognized properties exception
  2. Tuple out of bounds exception
  3. Invalid signature exception

Looking at the top of the call stack of exception 1, we are taken to this code. There are lots of class instance variables here which I don't believe are thread safe unless I'm missing something about how this get's called?

v2 and v3 present alternatives which create one Aws::DynamoDB instance per thread and globally respectively. Both suffer similar issues to varying degrees. The one regularly occurring common error between all three versions is point 3 above, the invalid signature error.

Before we look any further, is there an assumed usage pattern here? i.e. should one create a single, global Aws::DynamoDB instance, or one per thread, or per call?

Any thoughts on what the issue is here?

Are any of these issues potentially related to #43?

Performance degradation from aws-sdk-ruby

Just going to crack open an issue, spent the last few days moving from aws-sdk-ruby to aws-sdk-core-ruby and noticing a lot more time spent requesting DynamoDB and S3. Will dig further to and figure out whats going.

Curiosity, has any investigation been given to the performance difference between these two libraries?

SQS polling

I've got an SNS subscribed to a SQS. I'd like to poll the queue for messages and act on particular notifications. In v1 I would #poll the queue, but there doesn't seem to be an equivalent method to wait for pushed messages...

BlobShape returning nil, passed to strict_encode64

A couple days ago, I started to get consistent and unexplainable TypeError exceptions thrown when reading gzip compressed S3 objects. I initially thought it could of had something to do with the recent addition of response paging (which I updated too around the time the exceptions started happening) so I pegged aws-sdk-core-ruby to 9bd27dc. However the exceptions keep rolling in.

screen shot 2013-12-06 at 11 14 27

Will do some more investigation, any thoughts?

unexpected EOFErrors

In testing some calls, I am getting unexpected EOFErrors.

If I run this a couple times (or in a loop with a sleep)-
puts @s3.get_bucket_tagging(:bucket => 'my_bucket_name').tag_set.class

I receive the following-
EOFError: end of file reached
from /Users/me/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/openssl/buffering.rb:174:in sysread_nonblock' from /Users/me/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/openssl/buffering.rb:174:inread_nonblock'
from /Users/me/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/net/protocol.rb:141:in rbuf_fill' from /Users/me/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/net/protocol.rb:122:inreaduntil'
from /Users/me/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/net/protocol.rb:132:in readline' from /Users/me/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/net/http.rb:2563:inread_status_line'
from /Users/me/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/net/http.rb:2552:in read_new' from /Users/me/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/net/http.rb:1320:inblock in transport_request'
from /Users/me/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/net/http.rb:1317:in catch' from /Users/me/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/net/http.rb:1317:intransport_request'
from /Users/me/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/net/http.rb:1294:in request' from /Users/me/.rvm/gems/ruby-1.9.3-p448/gems/aws-sdk-core-2.0.0.rc2/vendor/seahorse/lib/seahorse/client/net_http/connection_pool.rb:325:inrequest'
from /Users/me/.rvm/gems/ruby-1.9.3-p448/gems/aws-sdk-core-2.0.0.rc2/vendor/seahorse/lib/seahorse/client/net_http/handler.rb:36:in block in transmit' from /Users/me/.rvm/gems/ruby-1.9.3-p448/gems/aws-sdk-core-2.0.0.rc2/vendor/seahorse/lib/seahorse/client/net_http/connection_pool.rb:107:insession_for'
from /Users/me/.rvm/gems/ruby-1.9.3-p448/gems/aws-sdk-core-2.0.0.rc2/vendor/seahorse/lib/seahorse/client/net_http/handler.rb:33:in transmit' from /Users/me/.rvm/gems/ruby-1.9.3-p448/gems/aws-sdk-core-2.0.0.rc2/vendor/seahorse/lib/seahorse/client/net_http/handler.rb:16:incall'
... 5 levels...
from /Users/me/.rvm/gems/ruby-1.9.3-p448/gems/aws-sdk-core-2.0.0.rc2/lib/aws/plugins/s3_md5s.rb:29:in call' from /Users/me/.rvm/gems/ruby-1.9.3-p448/gems/aws-sdk-core-2.0.0.rc2/lib/aws/plugins/s3_bucket_dns.rb:31:incall'
from /Users/me/.rvm/gems/ruby-1.9.3-p448/gems/aws-sdk-core-2.0.0.rc2/lib/aws/response_handler.rb:12:in call' from /Users/me/.rvm/gems/ruby-1.9.3-p448/gems/aws-sdk-core-2.0.0.rc2/lib/aws/request_handler.rb:14:incall'
from /Users/me/.rvm/gems/ruby-1.9.3-p448/gems/aws-sdk-core-2.0.0.rc2/lib/aws/plugins/user_agent.rb:12:in call' from /Users/me/.rvm/gems/ruby-1.9.3-p448/gems/aws-sdk-core-2.0.0.rc2/vendor/seahorse/lib/seahorse/client/plugins/restful_bindings.rb:13:incall'
from /Users/me/.rvm/gems/ruby-1.9.3-p448/gems/aws-sdk-core-2.0.0.rc2/vendor/seahorse/lib/seahorse/client/plugins/endpoint.rb:27:in call' from /Users/me/.rvm/gems/ruby-1.9.3-p448/gems/aws-sdk-core-2.0.0.rc2/vendor/seahorse/lib/seahorse/client/plugins/param_validation.rb:22:incall'
from /Users/me/.rvm/gems/ruby-1.9.3-p448/gems/aws-sdk-core-2.0.0.rc2/vendor/seahorse/lib/seahorse/client/plugins/raise_response_errors.rb:14:in call' from /Users/me/.rvm/gems/ruby-1.9.3-p448/gems/aws-sdk-core-2.0.0.rc2/vendor/seahorse/lib/seahorse/client/plugins/param_conversion.rb:22:incall'
from /Users/me/.rvm/gems/ruby-1.9.3-p448/gems/aws-sdk-core-2.0.0.rc2/vendor/seahorse/lib/seahorse/client/request.rb:56:in send_request' from /Users/me/.rvm/gems/ruby-1.9.3-p448/gems/aws-sdk-core-2.0.0.rc2/vendor/seahorse/lib/seahorse/client/plugins/operation_methods.rb:40:inblock (2 levels) in add_operation_helpers'
from (irb):66:in block in irb_binding' from (irb):65:ineach'
from (irb):65

I can't get past the second iteration of this for example-
1.9.3-p448 :069 > (1..10).each do |e|
1.9.3-p448 :070 > puts @s3.get_bucket_tagging(:bucket => 'my_bucket_name').tag_set.class
1.9.3-p448 :071?> sleep 3
1.9.3-p448 :072?> end

The first iteration properly prints Array.

Seeing this with several requests, not just get_bucket_tagging and not just on the class method. If I remove the class method, I see the same results on tag_set.

"MultiXml::ParseError: Content is not allowed in prolog" for describe_instances

We get this error every now and then when invoking Aws::EC2 describe_instances.

This is one of those "it only happens in prod at scale" errors. I enabled http_wire_trace however it sends our server load to over 20, so I couldn't run it long enough to get any data for when the error occurred.

Wondering if there are any other simple debug steps to take. It happens for random aws accounts, and different regions, and any time of day. I didn't notice any obvious pattern...

content_type is ignored

When writing a new object to S3, the content_type header is always overwritten to be application/xml.

require 'aws-sdk-core'
Aws.config = {...}
Aws.s3.put_object(bucket: 'foo', key: 'bar', body: 'baz', acl: 'public-read', content_type: 'text/html')

NoMethodError: undefined method `sigv4_name'

I am getting this error in production when run at scale. I can't reproduce locally. When it prod, creating a new Aws::Ec2 class and calling the describe_instances call may work 50 times in a row for a specific aws account, but then throw this exception, and then the next call work again.

I'm looking for some help in debugging. Anything in particular to try or look at.

Thanks!

::Aws::EC2.new({
          region: region['regionName'],
          credentials: creds,
          ssl_verify_peer: false
        }).describe_instances.each do |page|
NoMethodError: undefined method `sigv4_name' for #<#<Class:0x524347e0>:0x49fa5679>
File "/home/releases/127be001dfb1d900f71717dd2cf4d21eac4a2cc1/vendor/bundle/jruby/1.9/gems/aws-sdk-core-2.0.0.rc8/lib/aws/signers/v4.rb" line 10 in sign
File "/home/releases/127be001dfb1d900f71717dd2cf4d21eac4a2cc1/vendor/bundle/jruby/1.9/gems/aws-sdk-core-2.0.0.rc8/lib/aws/signers/handler.rb" line 12 in call
File "/home/releases/127be001dfb1d900f71717dd2cf4d21eac4a2cc1/vendor/bundle/jruby/1.9/gems/aws-sdk-core-2.0.0.rc8/lib/aws/error_handler.rb" line 12 in call
File "/home/releases/127be001dfb1d900f71717dd2cf4d21eac4a2cc1/vendor/bundle/jruby/1.9/gems/aws-sdk-core-2.0.0.rc8/lib/aws/plugins/retry_errors.rb" line 78 in call
File "/home/releases/127be001dfb1d900f71717dd2cf4d21eac4a2cc1/vendor/bundle/jruby/1.9/gems/aws-sdk-core-2.0.0.rc8/lib/aws/response_handler.rb" line 12 in call
File "/home/releases/127be001dfb1d900f71717dd2cf4d21eac4a2cc1/vendor/bundle/jruby/1.9/gems/aws-sdk-core-2.0.0.rc8/lib/aws/request_handler.rb" line 14 in call
File "/home/releases/127be001dfb1d900f71717dd2cf4d21eac4a2cc1/vendor/bundle/jruby/1.9/gems/aws-sdk-core-2.0.0.rc8/lib/aws/plugins/response_paging.rb" line 9 in call
File "/home/releases/127be001dfb1d900f71717dd2cf4d21eac4a2cc1/vendor/bundle/jruby/1.9/gems/aws-sdk-core-2.0.0.rc8/lib/aws/plugins/user_agent.rb" line 12 in call
File "/home/releases/127be001dfb1d900f71717dd2cf4d21eac4a2cc1/vendor/bundle/jruby/1.9/gems/aws-sdk-core-2.0.0.rc8/vendor/seahorse/lib/seahorse/client/plugins/restful_bindings.rb" line 13 in call
File "/home/releases/127be001dfb1d900f71717dd2cf4d21eac4a2cc1/vendor/bundle/jruby/1.9/gems/aws-sdk-core-2.0.0.rc8/vendor/seahorse/lib/seahorse/client/plugins/endpoint.rb" line 27 in call
File "/home/releases/127be001dfb1d900f71717dd2cf4d21eac4a2cc1/vendor/bundle/jruby/1.9/gems/aws-sdk-core-2.0.0.rc8/vendor/seahorse/lib/seahorse/client/plugins/param_validation.rb" line 22 in call
File "/home/releases/127be001dfb1d900f71717dd2cf4d21eac4a2cc1/vendor/bundle/jruby/1.9/gems/aws-sdk-core-2.0.0.rc8/vendor/seahorse/lib/seahorse/client/plugins/raise_response_errors.rb" line 14 in call
File "/home/releases/127be001dfb1d900f71717dd2cf4d21eac4a2cc1/vendor/bundle/jruby/1.9/gems/aws-sdk-core-2.0.0.rc8/vendor/seahorse/lib/seahorse/client/plugins/param_conversion.rb" line 22 in call
File "/home/releases/127be001dfb1d900f71717dd2cf4d21eac4a2cc1/vendor/bundle/jruby/1.9/gems/aws-sdk-core-2.0.0.rc8/vendor/seahorse/lib/seahorse/client/request.rb" line 70 in send_request
File "/home/releases/127be001dfb1d900f71717dd2cf4d21eac4a2cc1/vendor/bundle/jruby/1.9/gems/aws-sdk-core-2.0.0.rc8/vendor/seahorse/lib/seahorse/client/plugins/operation_methods.rb" line 42 in describe_instances

Conflict with legacy AWS-SDK and AWS Flow gems

Requiring aws-sdk-core alongside AWS Flow leads to the error: uninitialized constant AWS::Core::ServiceInterface::Errors (NameError) (stacktrace)

To reproduce:

  • download the AWS Flow sample code available here
  • verify that the Booking sample runs
  • add "require 'aws-sdk-core'" to the top of "booking_activity.rb"
  • attempt to run again

Specifying BlockDeviceMapping options in a RegisterImage call?

Hey all, loving the V2 SDK! Having a bit of a problem, though. I need to register an AMI from a snapshot using the SDK. I almost got it, but when specifying the option :block_device_mapping, I get the following error:

ArgumentError: unexpected value at params[:block_device_mapping]

I'm using IRB, and here is the command I used that produced this message:

ec2.register_image(:name => 'test-persistence-1', :architecture => 'x86_64', :root_device_name => '/dev/sda1', :block_device_mapping => [{:device_name => '/dev/sda1', :snapshot_id => 'snap-43e0815f', :volume_size => 8, :delete_on_termination => false}], :kernel_id => 'aki-44ae75e1')

It's weird, though, because I remember specifying this option last night using a different API call (I think it was CreateImage), and it allowed me to specify the block device mapping options there.

Any ideas?

Threading issue from aws-sdk-ruby

Much like #14, I've migrated over some Sidekiq based background processing to discover occasional issues with seahorse whilst using aws-sdk-core-ruby.

Here's a couple examples:

Below is the way in which I'm storing my references to DynamoDB and S3 so don't believe this to be an issue of threading in my code as far as I'm aware.

require 'aws-sdk-core'
def archive_s3
  Thread.current[:archive_s3] ||= Aws::S3.new
end

Will do some more investigation, any thoughts?

Net::OpenTimeout: execution expired

Hey,

Makes me feel all good inside to have found this repo tonight. I guess this is very, very new? Either way, I wouldn't mind helping in fixing this issue, if someone can get me on the right track...

So, I am doing work for a client, and part of my job right now is to write a software suite for him that can automatically re-start his spot instances. Unfortunately, the V1 of the API doesn't seem to have support for this.
`
I found this repo tonight, and installed the gem. Upon opening an IRB session, I required the gem and setup my AWS access credentials. Strangely, when I issue any request at all (for instance, describe_instances), I get the error "Net::OpenTimeout: execution expired". Here is a stack trace, if it helps: https://gist.github.com/Inkybro/7508323

Could this be a problem w/ Ruby 2.0.0? I will try with 1.9.3-p392 now.

Trouble porting VPC collection from prior gem

At reInvent the team talked about the issue(s) of S3 and ec2 issues when porting to the new core gem, however I'm having a lot of issues with the vpcs (VPC collection) which I forgot was a subclass of EC2 since the structure has totally changed.

Are there any strategies at least for just using the vpc id?

Unclear validation error

I've been using this SDK (with DynamoDB and S3) for a couple of months and it's been a pleasure so far! However, I recently ran into a validation error that I cannot wrap my head around. I seem to be periodically getting this error "Key datatypes must be scalars, not sets" when I make an update_item call to DynamoDB. I'm using DynamoDBLocal, if that makes a difference. The hash key for my table is a number and in no way am I passing in a set. Could there be a bug in the SDK with this method, or am I misunderstanding something about this error?
My code:

      Aws::DynamoDB.new.update_item(
        table_name: "Books",
        key: {
          "book_id" => {n: "#{@id}"}
        },
        attribute_updates: attributes_to_update,
        expected: {
          "book_id" => {
            comparison_operator: "NOT_NULL"
          }
        }
      )

    def attributes_to_update
      updated_attributes = {}
      updated_attributes["title"] = {value: {s: "#{@title}"}, action: "PUT"}
      updated_attributes["description"] = {value: {s: "#{@description}"}, action: "PUT"}
      updated_attributes["tags"] = {value: {ss: @tags}, action: "PUT"}
      updated_attributes["updated_at"] = {value: {s: "#{@updated_at}"}, action: "PUT"}
      return updated_attributes
    end

NoMethodError when calling get_job_output on Glacier object

Seeing this error when trying to process an archive-retrieval job and calling get_job_output:

NoMethodError

You have a nil object when you didn't expect it! You might have expected an instance of Array. The error occurred while evaluating nil.[]=
/Users/telvueben/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/aws-sdk-core-2.0.0.rc2/vendor/seahorse/lib/seahorse/model/shapes/shape.rb:201:in `block (2 levels) in member_map'
/Users/telvueben/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/aws-sdk-core-2.0.0.rc2/vendor/seahorse/lib/seahorse/model/shapes/shape.rb:200:in `each'
/Users/telvueben/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/aws-sdk-core-2.0.0.rc2/vendor/seahorse/lib/seahorse/model/shapes/shape.rb:200:in `block in member_map'
/Users/telvueben/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/aws-sdk-core-2.0.0.rc2/vendor/seahorse/lib/seahorse/model/shapes/shape.rb:199:in `tap'
/Users/telvueben/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/aws-sdk-core-2.0.0.rc2/vendor/seahorse/lib/seahorse/model/shapes/shape.rb:199:in `member_map'
/Users/telvueben/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/aws-sdk-core-2.0.0.rc2/vendor/seahorse/lib/seahorse/model/shapes/shape.rb:158:in `header_members'
/Users/telvueben/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/aws-sdk-core-2.0.0.rc2/vendor/seahorse/lib/seahorse/client/plugins/restful_bindings.rb:80:in `extract_headers'
/Users/telvueben/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/aws-sdk-core-2.0.0.rc2/vendor/seahorse/lib/seahorse/client/plugins/restful_bindings.rb:74:in `parse_response'
/Users/telvueben/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/aws-sdk-core-2.0.0.rc2/vendor/seahorse/lib/seahorse/client/plugins/restful_bindings.rb:14:in `block in call'
/Users/telvueben/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/aws-sdk-core-2.0.0.rc2/vendor/seahorse/lib/seahorse/client/response.rb:41:in `on_status'
/Users/telvueben/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/aws-sdk-core-2.0.0.rc2/vendor/seahorse/lib/seahorse/client/response.rb:54:in `on_success'
/Users/telvueben/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/aws-sdk-core-2.0.0.rc2/vendor/seahorse/lib/seahorse/client/plugins/restful_bindings.rb:13:in `call'
/Users/telvueben/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/aws-sdk-core-2.0.0.rc2/vendor/seahorse/lib/seahorse/client/plugins/endpoint.rb:27:in `call'
/Users/telvueben/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/aws-sdk-core-2.0.0.rc2/vendor/seahorse/lib/seahorse/client/plugins/param_validation.rb:22:in `call'
/Users/telvueben/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/aws-sdk-core-2.0.0.rc2/vendor/seahorse/lib/seahorse/client/plugins/raise_response_errors.rb:14:in `call'
/Users/telvueben/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/aws-sdk-core-2.0.0.rc2/vendor/seahorse/lib/seahorse/client/handler_builder.rb:12:in `block in handle_request'
/Users/telvueben/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/aws-sdk-core-2.0.0.rc2/vendor/seahorse/lib/seahorse/client/plugins/param_conversion.rb:22:in `call'
/Users/telvueben/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/aws-sdk-core-2.0.0.rc2/vendor/seahorse/lib/seahorse/client/request.rb:56:in `send_request'
/Users/telvueben/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/aws-sdk-core-2.0.0.rc2/vendor/seahorse/lib/seahorse/client/plugins/operation_methods.rb:40:in `block (2 levels) in add_operation_helpers'

Will you be adding an eager_autoload! method?

The old AWS SDK had an eager_autoload! method that was very useful in multi-threaded applications. The current implementation doesn't seem to have an eager load behavior which makes it hard to use with libraries like Sidekiq and Puma.

Problem loading Seahorse on latest RC9

Hey guys,

Since the newest rc (2.0.0.rc9), I'm having trouble constructing any client objects on a fresh install of aws-sdk-core in a fresh gemset; basically, they all fail with:

NameError: uninitialized constant Class::Seahorse
    from /Users/apetresc/dev/proj/.gems/gems/aws-sdk-core-2.0.0.rc9/lib/aws/service.rb:212:in `api'
    from /Users/apetresc/dev/proj/.gems/gems/aws-sdk-core-2.0.0.rc9/lib/aws/service.rb:182:in `const_missing'
    from /Users/apetresc/dev/proj/.gems/gems/aws-sdk-core-2.0.0.rc9/lib/aws/service.rb:202:in `const_get'
    from /Users/apetresc/dev/proj/.gems/gems/aws-sdk-core-2.0.0.rc9/lib/aws/service.rb:202:in `versioned_client_class'
    from /Users/apetresc/dev/proj/.gems/gems/aws-sdk-core-2.0.0.rc9/lib/aws/service.rb:49:in `new'
    from (irb):2
    from /Users/apetresc/.rbenv/versions/2.1.2/bin/irb:11:in `<main>'

I'm able to require 'seahorse' just fine. and .gems/gems/aws-sdk-core-2.0.0.rc9/vendor/seahorse/lib/seahorse/model/api.rb looks normal and certainly exists.

Anyone have any idea what might have changed to cause this? I can find no mention of other people having this problem.

Response Body not rewound with get_object with a version_id

when I retrieve a versioned object from s3, the PlainStringIO is at the end of the file. So the code I have to write is:

      object = @s3.get_object(bucket:@s3_bucket, key: key, version_id: version)
      # TODO find out why this isn't always rewound?
      object.body.rewind if object.body.respond_to?(:rewind)
      Yajl::Parser.parse(object.body)

If I don't rewind the bodies, #read returns an empty string and there's a parsing error.

Looking at response.rb in seahorse I see that body= doesn't rewind or otherwise sanity check IOs it receives:

        def body=(io)
          @body = case io
            when nil then PlainStringIO.new('')
            when String then PlainStringIO.new(io)
            else io
          end
        end

However I can't follow where the response bodies are actually set, so unfortunately I can't see if all those paths are ensuring that the values they set are in a sane state. By default they wouldn't be:

s = StringIO.new # => #<StringIO:0x007fdd722680c0>
s.write("asdf") # => 4
s.read # => ""

Populate :location_constraint on S3#create_bucket based on endpoint

The v1 Ruby SDK auto populates the bucket location constraint based on the endpoint when calling AWS::S3::BucketCollection#create (see https://github.com/aws/aws-sdk-ruby/blob/master/lib/aws/s3/bucket_collection.rb#L91).

It would be great to have a S3 plugin that performs the same function. It could before validation, populate the location constraint if it was not set in the request. Example:

# current usage
s3 = Aws::S3.new(region: 'sa-east-1')
resp = s3.create_bucket(
  bucket: "bucket-name", 
  create_bucket_configuration: {location_constraint: 'sa-east-1'}
)

# ideal usage
s3 = Aws::S3.new(region: 'sa-east-1')
resp = s3.create_bucket(bucket: "bucket-name")

# notice the auto-populated request params
resp.context.params
#=> { :bucket => "bucket-name", :create_bucket_configuration => { :location_constraint => 'sa-east-1' }}

Route53 API request model correction

Request model includes path only input:

/Users/ps/.rvm/gems/ruby-2.1.0@aws/gems/aws-sdk-core-2.0.0.rc4/vendor/seahorse/lib/seahorse/client/plugins/raise_response_errors.rb:15:in `call': Invalid XML ; cvc-complex-type.2.4.a: Invalid content was found starting with element 'hosted_zone_id'. One of '{"https://route53.amazonaws.com/doc/2012-12-12/":ChangeBatch}' is expected. (Aws::Route53::Errors::InvalidInput)

Also mentioned here:
https://forums.aws.amazon.com/thread.jspa?threadID=143670

Should look like example here:
http://docs.aws.amazon.com/Route53/latest/APIReference/API_ChangeResourceRecordSets.html#API_ChangeResourceRecordSets_Requests

undefined method `split' for nil:NilClass

Hi

I have some workers (using Celluloid) which process SQS messages and save some data in a DynamoDB Table (an item per message), most of the times the write operation works fine, but sometimes it fails and returns undefined method split' for nil:NilClass:

undefined method `split' for nil:NilClass
/data/my_project/shared/bundle/ruby/2.0.0/gems/aws-sdk-core-2.0.0.rc8/lib/aws/error_handler.rb:27:in `error'
/data/my_project/shared/bundle/ruby/2.0.0/gems/aws-sdk-core-2.0.0.rc8/lib/aws/error_handler.rb:19:in `block in call'
/data/my_project/shared/bundle/ruby/2.0.0/gems/aws-sdk-core-2.0.0.rc8/vendor/seahorse/lib/seahorse/client/response.rb:36:in `on'
/data/my_project/shared/bundle/ruby/2.0.0/gems/aws-sdk-core-2.0.0.rc8/lib/aws/error_handler.rb:12:in `call'
/data/my_project/shared/bundle/ruby/2.0.0/gems/aws-sdk-core-2.0.0.rc8/lib/aws/plugins/retry_errors.rb:78:in `call'
/data/my_project/shared/bundle/ruby/2.0.0/gems/aws-sdk-core-2.0.0.rc8/lib/aws/plugins/json_rpc_headers.rb:15:in `call'
/data/my_project/shared/bundle/ruby/2.0.0/gems/aws-sdk-core-2.0.0.rc8/lib/aws/response_handler.rb:12:in `call'
/data/my_project/shared/bundle/ruby/2.0.0/gems/aws-sdk-core-2.0.0.rc8/lib/aws/request_handler.rb:14:in `call'
/data/my_project/shared/bundle/ruby/2.0.0/gems/aws-sdk-core-2.0.0.rc8/lib/aws/plugins/response_paging.rb:9:in `call'
/data/my_project/shared/bundle/ruby/2.0.0/gems/aws-sdk-core-2.0.0.rc8/lib/aws/plugins/user_agent.rb:12:in `call'
/data/my_project/shared/bundle/ruby/2.0.0/gems/aws-sdk-core-2.0.0.rc8/vendor/seahorse/lib/seahorse/client/plugins/restful_bindings.rb:13:in `call'
/data/my_project/shared/bundle/ruby/2.0.0/gems/aws-sdk-core-2.0.0.rc8/vendor/seahorse/lib/seahorse/client/plugins/endpoint.rb:27:in `call'
/data/my_project/shared/bundle/ruby/2.0.0/gems/aws-sdk-core-2.0.0.rc8/vendor/seahorse/lib/seahorse/client/plugins/param_validation.rb:22:in `call'
/data/my_project/shared/bundle/ruby/2.0.0/gems/aws-sdk-core-2.0.0.rc8/vendor/seahorse/lib/seahorse/client/plugins/raise_response_errors.rb:14:in `call'
/data/my_project/shared/bundle/ruby/2.0.0/gems/aws-sdk-core-2.0.0.rc8/vendor/seahorse/lib/seahorse/client/plugins/param_conversion.rb:22:in `call'
/data/my_project/shared/bundle/ruby/2.0.0/gems/aws-sdk-core-2.0.0.rc8/vendor/seahorse/lib/seahorse/client/request.rb:70:in `send_request'
/data/my_project/shared/bundle/ruby/2.0.0/gems/aws-sdk-core-2.0.0.rc8/vendor/seahorse/lib/seahorse/client/plugins/operation_methods.rb:42:in `block (2 levels) in add_operation_helpers'

For 5k messages I got 742 errors like the one above. But when I re-attempt, it works fine.

Any ideas?

Specific credentials for DynamoDB?

Hey

Is there a way to use specific credentials only for DynamoDB?

Instead of Aws.config[:credentials] (global), having something specific for DynamoDB like Aws.config[:dynamodb][:credentials]?

Aws.config[:credentials] = Aws::Credentials.new '...', '...'
Aws.config[:region]      = 'us-east-1'
Aws.config[:dynamodb]    = { region: 'us-east-1' }

s3 :: bucket names with periods :: SignatureDoesNotMatch

If you try operations on an s3 bucket with periods in the bucket name it will fail with Aws::S3::Errors::SignatureDoesNotMatch.

Name: get_bucket_acl
Params: {:bucket=>"some.bucket.with.periods"}
Send options: {}
Rescuing: The request signature we calculated does not match the signature you provided. Check your key and signing method.
Backtrace:
/Users/me/.rvm/gems/ruby-1.9.3-p448/gems/aws-sdk-core-2.0.0.rc2/vendor/seahorse/lib/seahorse/client/plugins/raise_response_errors.rb:15:in call' /Users/me/.rvm/gems/ruby-1.9.3-p448/gems/aws-sdk-core-2.0.0.rc2/vendor/seahorse/lib/seahorse/client/plugins/param_conversion.rb:22:incall'
/Users/me/.rvm/gems/ruby-1.9.3-p448/gems/aws-sdk-core-2.0.0.rc2/vendor/seahorse/lib/seahorse/client/request.rb:56:in send_request' /Users/me/.rvm/gems/ruby-1.9.3-p448/gems/aws-sdk-core-2.0.0.rc2/vendor/seahorse/lib/seahorse/client/plugins/operation_methods.rb:43:inblock (2 levels) in add_operation_helpers'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.