aws-sdk-core 3.65.1 → 3.66.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d5e11d300e77b72f5354c1823a4f2296e471aea9
4
- data.tar.gz: 554e75ee626d10ba04115ff38f25e8f54c415071
3
+ metadata.gz: 8ec9fdf113b40a884e183f5d3b931728f2accea8
4
+ data.tar.gz: 3999aaff5c4a302016315f8df1ff8e2f8dd2f409
5
5
  SHA512:
6
- metadata.gz: c1e7a33a041693a436ac986d98ff92583ed0e9340c33b51a75c881a2b4f69c14a58e2b85f5c5efe33a91afadaf9e2ec9d4d1d1d8191eea70524de4d51c65e838
7
- data.tar.gz: ca073814d9a540479ecfa1d35016951fe7d53edbc961d0186c01afa91eceba49a9d2396075dee6f40d24f6b77999b5d7975999e970dbae8e099f1f1af2df6bc7
6
+ metadata.gz: e987848064b5c11b8909c97239abd7287b4e584805636b4d0c6b2b01169ba677f6ca41f994c18929b08bd3c3d111d84b6585223ce84110e20989b5f62a939f06
7
+ data.tar.gz: 1c330cf83d45356298c1a4a31d76599d3a11d71932d270d6e3205a86fdd89e79f3a65ac8d6d458843312062bcad8f21bbb71d2bbba13fb20ded48bcbc6f7be69
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.65.1
1
+ 3.66.0
@@ -60,22 +60,20 @@ module Aws
60
60
  nil
61
61
  end
62
62
 
63
+ def determine_profile_name(options)
64
+ (options[:config] && options[:config].profile) || ENV['AWS_PROFILE'] || ENV['AWS_DEFAULT_PROFILE'] || 'default'
65
+ end
66
+
63
67
  def shared_credentials(options)
64
- if options[:config]
65
- SharedCredentials.new(profile_name: options[:config].profile)
66
- else
67
- SharedCredentials.new(
68
- profile_name: ENV['AWS_PROFILE'].nil? ? 'default' : ENV['AWS_PROFILE'])
69
- end
68
+ profile_name = determine_profile_name(options)
69
+ SharedCredentials.new(profile_name: profile_name)
70
70
  rescue Errors::NoSuchProfileError
71
71
  nil
72
72
  end
73
73
 
74
74
  def process_credentials(options)
75
- profile_name = options[:config].profile if options[:config]
76
- profile_name ||= ENV['AWS_PROFILE'].nil? ? 'default' : ENV['AWS_PROFILE']
77
-
78
75
  config = Aws.shared_config
76
+ profile_name = determine_profile_name(options)
79
77
  if config.config_enabled? && process_provider = config.credentials_process(profile_name)
80
78
  ProcessCredentials.new(process_provider)
81
79
  else
@@ -87,13 +85,7 @@ module Aws
87
85
 
88
86
  def assume_role_credentials(options)
89
87
  if Aws.shared_config.config_enabled?
90
- profile, region = nil, nil
91
- if options[:config]
92
- profile = options[:config].profile
93
- region = options[:config].region
94
- assume_role_with_profile(options[:config].profile, options[:config].region)
95
- end
96
- assume_role_with_profile(profile, region)
88
+ assume_role_with_profile(options)
97
89
  else
98
90
  nil
99
91
  end
@@ -123,9 +115,11 @@ module Aws
123
115
  end
124
116
  end
125
117
 
126
- def assume_role_with_profile(prof, region)
118
+ def assume_role_with_profile(options)
119
+ profile_name = determine_profile_name(options)
120
+ region = (options[:config] && options[:config].region)
127
121
  Aws.shared_config.assume_role_credentials_from_config(
128
- profile: prof,
122
+ profile: profile_name,
129
123
  region: region,
130
124
  chain_config: @config
131
125
  )
@@ -51,8 +51,9 @@ module Aws
51
51
  super
52
52
  end
53
53
 
54
- # @return [Integer] The number of times to retry failed attempts to
55
- # fetch credentials from the instance metadata service. Defaults to 0.
54
+ # @return [Integer] Number of times to retry when retrieving credentials
55
+ # from the instance metadata service. Defaults to 0 when resolving from
56
+ # the default credential chain ({Aws::CredentialProviderChain}).
56
57
  attr_reader :retries
57
58
 
58
59
  private
@@ -40,6 +40,6 @@ require_relative 'aws-sdk-sts/customizations'
40
40
  # @service
41
41
  module Aws::STS
42
42
 
43
- GEM_VERSION = '3.65.1'
43
+ GEM_VERSION = '3.66.0'
44
44
 
45
45
  end
@@ -1808,7 +1808,7 @@ module Aws::STS
1808
1808
  params: params,
1809
1809
  config: config)
1810
1810
  context[:gem_name] = 'aws-sdk-core'
1811
- context[:gem_version] = '3.65.1'
1811
+ context[:gem_version] = '3.66.0'
1812
1812
  Seahorse::Client::Request.new(handlers, context)
1813
1813
  end
1814
1814
 
@@ -77,8 +77,8 @@ module Seahorse
77
77
  if options.key?(name)
78
78
  options[name]
79
79
  else
80
- msg = "invalid :priority `%s', must be between 0 and 99"
81
- raise ArgumentError, msg % priority.inspect
80
+ msg = "missing option: `%s'"
81
+ raise ArgumentError, msg % name.inspect
82
82
  end
83
83
  end
84
84
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-sdk-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.65.1
4
+ version: 3.66.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amazon Web Services
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-08-28 00:00:00.000000000 Z
11
+ date: 2019-09-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jmespath