gem install aws-sdk
Successfully installed aws-sdk-2.3.21
Parsing documentation for aws-sdk-2.3.21
Done installing documentation for aws-sdk after 0 seconds
1 gem installed
key = OpenSSL::PKey::RSA.new(1024)
s3 = Aws::S3::Encryption::Client.new(encryption_key: key)
block in partition_matching_region': undefined methodmatch' for nil:NilClass (NoMethodError)each'
from /usr/local/lib/ruby/gems/2.3.0/gems/aws-sdk-core-2.3.21/lib/aws-sdk-core/endpoint_provider.rb:66:infind'partition_matching_region'
from /usr/local/lib/ruby/gems/2.3.0/gems/aws-sdk-core-2.3.21/lib/aws-sdk-core/endpoint_provider.rb:55:inget_partition'endpoint_for'
from /usr/local/lib/ruby/gems/2.3.0/gems/aws-sdk-core-2.3.21/lib/aws-sdk-core/endpoint_provider.rb:10:inresolve'resolve'
from /usr/local/lib/ruby/gems/2.3.0/gems/aws-sdk-core-2.3.21/lib/aws-sdk-core/plugins/regional_endpoint.rb:24:inblock in class:RegionalEndpoint'call'
from /usr/local/lib/ruby/gems/2.3.0/gems/aws-sdk-core-2.3.21/lib/seahorse/client/configuration.rb:205:inblock in resolve_defaults'each'
from /usr/local/lib/ruby/gems/2.3.0/gems/aws-sdk-core-2.3.21/lib/seahorse/client/configuration.rb:57:ineach'resolve_defaults'
from /usr/local/lib/ruby/gems/2.3.0/gems/aws-sdk-core-2.3.21/lib/seahorse/client/configuration.rb:200:invalue_at'block in resolve'
from /usr/local/Cellar/ruby/2.3.0/lib/ruby/2.3.0/set.rb:306:ineach_key'each'
from /usr/local/lib/ruby/gems/2.3.0/gems/aws-sdk-core-2.3.21/lib/seahorse/client/configuration.rb:189:inresolve'apply_defaults'
from /usr/local/lib/ruby/gems/2.3.0/gems/aws-sdk-core-2.3.21/lib/seahorse/client/configuration.rb:150:inbuild!'build_config'
from /usr/local/lib/ruby/gems/2.3.0/gems/aws-sdk-core-2.3.21/lib/seahorse/client/base.rb:19:ininitialize'new'
from /usr/local/lib/ruby/gems/2.3.0/gems/aws-sdk-resources-2.3.21/lib/aws-sdk-resources/services/s3/encryption/client.rb:298:inextract_client'initialize'
from DS3.rb:5:innew'Related to #1237
This means you haven't configured a region. To configure a region, set the AWS_REGION environment variable, or pass it in as a parameter. For example:
key = OpenSSL::PKey::RSA.new(1024)
s3 = Aws::S3::Encryption::Client.new(encryption_key: key, region: "us-east-1") # or the region you are using
From: Alex Wood <[email protected]notifications@github.com>
Reply-To: aws/aws-sdk-ruby <[email protected]reply@reply.github.com>
Date: Monday, July 11, 2016 at 4:10 PM
To: aws/aws-sdk-ruby <[email protected]aws-sdk-ruby@noreply.github.com>
Cc: Dan Blondowski
Subject: Re: [aws/aws-sdk-ruby] undefined method `match' for nil:NilClass (NoMethodError) when opening encryptionClient (#1240)
Related to #1237https://github.com/aws/aws-sdk-ruby/issues/1237
This means you haven't configured a region. To configure a region, set the AWS_REGION environment variable, or pass it in as a parameter. For example:
key = OpenSSL::PKey::RSA.new(1024)
s3 = Aws::S3::Encryption::Client.new(encryption_key: key, region: "us-east-1") # or the region you are using
You are receiving this because you authored the thread.
This email has been scanned for email related threats and delivered safely by Mimecast.
It's an unhelpful error that I'm aiming to fix, though it's something I can't consistently reproduce either so it's been slightly elusive. Sorry about the unhelpful error message.
Most helpful comment
Related to #1237
This means you haven't configured a region. To configure a region, set the
AWS_REGIONenvironment variable, or pass it in as a parameter. For example: