You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1.9.3-p125 :002 > opts = {:access_key_id => "XXXX", :secret_access_key=>"XXXX", :region=>"us-east-1", :encryption_key => "XXXX"}
=> {:access_key_id=>"XXXX", :secret_access_key=>"XXXX", :region=>"us-east-1", :encryption_key=>"XXXX"}
1.9.3-p125 :003 > client = Aws::S3::Encryption::Client.new(opts)
Aws::Errors::MissingRegionError: missing region; use :region option or export region name to ENV['AWS_REGION']
from /usr/local/rvm/gems/ruby-1.9.3-p125/gems/aws-sdk-core-2.0.41/lib/aws-sdk-core/plugins/regional_endpoint.rb:30:in `after_initialize'
from /usr/local/rvm/gems/ruby-1.9.3-p125/gems/aws-sdk-core-2.0.41/lib/seahorse/client/base.rb:86:in `block in after_initialize'
from /usr/local/rvm/gems/ruby-1.9.3-p125/gems/aws-sdk-core-2.0.41/lib/seahorse/client/base.rb:85:in `each'
from /usr/local/rvm/gems/ruby-1.9.3-p125/gems/aws-sdk-core-2.0.41/lib/seahorse/client/base.rb:85:in `after_initialize'
from /usr/local/rvm/gems/ruby-1.9.3-p125/gems/aws-sdk-core-2.0.41/lib/seahorse/client/base.rb:23:in `initialize'
from /usr/local/rvm/gems/ruby-1.9.3-p125/gems/aws-sdk-core-2.0.41/lib/aws-sdk-core/client_stubs.rb:19:in `initialize'
from /usr/local/rvm/gems/ruby-1.9.3-p125/gems/aws-sdk-core-2.0.41/lib/seahorse/client/base.rb:107:in `new'
from /usr/local/rvm/gems/ruby-1.9.3-p125/gems/aws-sdk-resources-2.0.41/lib/aws-sdk-resources/services/s3/encryption/client.rb:183:in `initialize'
from (irb):3:in `new'
from (irb):3
from /usr/local/rvm/rubies/ruby-1.9.3-p125/bin/irb:12:in `<main>'
The workaround it to construct a vanilla Aws::S3::Client and pass that in via :client. I corrected the documentation on this, and then expanded the initialize method to accept vanilla client options as well, such as :region.
Additional info:
System: Centos 6.6
Ruby Version: 1.9.3-p125
I exported the region as an Environment Variable and that seems to work, but explicit definition in the instantiation of the client seems to be a bug.
The text was updated successfully, but these errors were encountered: