S3 get_bucket_location operation fails if the bucket lives in a region other than the one used during the resquest
Closed this issue · 1 comments
If i make a request for the bucket location of a bucket that lives in a region other than the region I am requesting from, then this error happens. This is an issue because we'll get a listing of buckets using a request against us-east-1 and then loop over each bucket and make another request to get the location, and it will fail in this way.
Exception:
NoMethodError: undefined method `key?' for "us-gov-west-1":String
from aws-sdk-core-ruby-b273ed806509/aws-sdk-core/lib/aws-sdk-core/xml/parser.rb:34:in `block in structure'
values is simply a string, like "us-gov-west-1" for the line if values.key?(value_key)
I did put code in aws-sdk-core-ruby-b273ed806509/aws-sdk-core/lib/aws-sdk-core/plugins/s3_get_bucket_location_fix.rb but it doesn't seem to get invoked so I don't think this plugin is getting used.
And context.http_response.inspect:
#<Seahorse::Client::Http::Response:0x00000008f19f70 @status_code=0, @headers={}, @body=#<StringIO:0x00000008f19ea8>, @listeners={}, @complete=false>
I just pushed a fix for this issue here: 4a6ed7a - I expect to perform a release tomorrow that contains this fix. Thanks for reporting the issue.