aws-sdk-core 3.213.0 → 3.222.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +123 -0
  3. data/VERSION +1 -1
  4. data/lib/aws-defaults/default_configuration.rb +1 -2
  5. data/lib/aws-sdk-core/arn.rb +1 -3
  6. data/lib/aws-sdk-core/assume_role_credentials.rb +1 -0
  7. data/lib/aws-sdk-core/assume_role_web_identity_credentials.rb +1 -0
  8. data/lib/aws-sdk-core/cbor/decoder.rb +0 -2
  9. data/lib/aws-sdk-core/cbor/encoder.rb +2 -2
  10. data/lib/aws-sdk-core/client_stubs.rb +22 -48
  11. data/lib/aws-sdk-core/credential_provider.rb +4 -0
  12. data/lib/aws-sdk-core/credential_provider_chain.rb +27 -7
  13. data/lib/aws-sdk-core/credentials.rb +6 -0
  14. data/lib/aws-sdk-core/ecs_credentials.rb +1 -0
  15. data/lib/aws-sdk-core/errors.rb +2 -2
  16. data/lib/aws-sdk-core/instance_profile_credentials.rb +1 -0
  17. data/lib/aws-sdk-core/log/param_formatter.rb +7 -3
  18. data/lib/aws-sdk-core/plugins/checksum_algorithm.rb +332 -170
  19. data/lib/aws-sdk-core/plugins/client_metrics_plugin.rb +0 -1
  20. data/lib/aws-sdk-core/plugins/http_checksum.rb +2 -8
  21. data/lib/aws-sdk-core/plugins/sign.rb +16 -2
  22. data/lib/aws-sdk-core/plugins/stub_responses.rb +24 -8
  23. data/lib/aws-sdk-core/plugins/user_agent.rb +32 -2
  24. data/lib/aws-sdk-core/process_credentials.rb +1 -1
  25. data/lib/aws-sdk-core/rest/request/headers.rb +1 -1
  26. data/lib/aws-sdk-core/shared_config.rb +73 -21
  27. data/lib/aws-sdk-core/shared_credentials.rb +1 -0
  28. data/lib/aws-sdk-core/sso_credentials.rb +2 -0
  29. data/lib/aws-sdk-sso/client.rb +52 -29
  30. data/lib/aws-sdk-sso/endpoint_provider.rb +14 -18
  31. data/lib/aws-sdk-sso.rb +1 -1
  32. data/lib/aws-sdk-ssooidc/client.rb +89 -49
  33. data/lib/aws-sdk-ssooidc/client_api.rb +6 -0
  34. data/lib/aws-sdk-ssooidc/endpoint_provider.rb +14 -18
  35. data/lib/aws-sdk-ssooidc/types.rb +48 -16
  36. data/lib/aws-sdk-ssooidc.rb +1 -1
  37. data/lib/aws-sdk-sts/client.rb +64 -42
  38. data/lib/aws-sdk-sts/endpoint_provider.rb +33 -38
  39. data/lib/aws-sdk-sts/errors.rb +16 -0
  40. data/lib/aws-sdk-sts/types.rb +5 -6
  41. data/lib/aws-sdk-sts.rb +1 -1
  42. data/lib/seahorse/client/async_base.rb +4 -5
  43. data/lib/seahorse/client/base.rb +0 -14
  44. data/lib/seahorse/client/h2/connection.rb +18 -28
  45. data/lib/seahorse/client/net_http/connection_pool.rb +2 -0
  46. data/lib/seahorse/client/networking_error.rb +1 -1
  47. data/lib/seahorse/client/plugins/h2.rb +4 -4
  48. data/lib/seahorse/client/response.rb +2 -0
  49. data/sig/aws-sdk-core/async_client_stubs.rbs +21 -0
  50. data/sig/seahorse/client/async_base.rbs +18 -0
  51. metadata +38 -8
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a6f3a73413b33e6f06d9906357757e3ddd53a140b8abe22a7b61c8a316c090b9
4
- data.tar.gz: 3e67a072f69d008280dc9b6385c6d269e81bb4441925c61fa344dd9c54092d6f
3
+ metadata.gz: 543f2491a007a364595da80e74d9398c60e102f7f10ce2a7c273ef387ed404e4
4
+ data.tar.gz: b15da4be99f2e14d46a3a209d1a591b7bf3e5d798c65414bf610126a2602c615
5
5
  SHA512:
6
- metadata.gz: 413f47ca0e62d52310466498a472288f180b1c0c16923e243354f07c2798f467f025c556a6ec2cb97cfd903c0e54d886b8271bc8bc94633383b078ca50df56fe
7
- data.tar.gz: 2848664939e23d6e71900b72c63628d17214167e49927f692e3d64abed012f936ffde0fe2267611103bc0c0f00139c77b99a0095e035bae0a5b0e2a2d879361e
6
+ metadata.gz: 2e41199107772d46d290fdf8c4495dae9967bbb1e2849ddb024d4c4e2eaa649ff2a513a9e72ecc1ac134124e9c15a4540a954c1c87649ddc9de653569cab7da6
7
+ data.tar.gz: 6fe94fede561d4fcfedd36f40300378bdb5af6e2eb182db8355546c313074d4b5535840a25cd54ccd90981208fc97e073e49a30be5e19fb7d7fb850d2e49d787
data/CHANGELOG.md CHANGED
@@ -1,6 +1,129 @@
1
1
  Unreleased Changes
2
2
  ------------------
3
3
 
4
+ 3.222.3 (2025-04-28)
5
+ ------------------
6
+
7
+ * Issue - Do not dynamically create operation methods from the API. (#3234)
8
+
9
+ 3.222.2 (2025-04-16)
10
+ ------------------
11
+
12
+ * Issue - Additional metrics collection for credentials in the User-Agent plugin.
13
+
14
+ 3.222.1 (2025-03-28)
15
+ ------------------
16
+
17
+ * Issue - Allow explicit modeled headers to override prefixed headers for `rest` protocols.
18
+
19
+ 3.222.0 (2025-03-27)
20
+ ------------------
21
+
22
+ * Feature - Updated Aws::SSOOIDC::Client with the latest API changes.
23
+
24
+ * Feature - This release adds AwsAdditionalDetails in the CreateTokenWithIAM API response.
25
+
26
+ 3.221.0 (2025-03-24)
27
+ ------------------
28
+
29
+ * Feature - Add `logger` as an explicit dependency for Ruby 3.5.
30
+ * Issue - Enable ALPN over TLS for H2 Connection by default.
31
+ * Issue - Fix HTTP-2 connections to properly use config values configured on the client.
32
+
33
+ 3.220.2 (2025-03-20)
34
+ ------------------
35
+
36
+ * Issue - Enable ALPN over TLS for H2 by default.
37
+
38
+ 3.220.1 (2025-03-06)
39
+ ------------------
40
+
41
+ * Issue - Convert stubs at request time.
42
+
43
+ 3.220.0 (2025-03-04)
44
+ ------------------
45
+
46
+ * Feature - Updated Aws::STS::Client with the latest API changes.
47
+
48
+ 3.219.0 (2025-02-18)
49
+ ------------------
50
+
51
+ * Feature - Updated Aws::STS::Client with the latest API changes.
52
+
53
+ * Feature - Updated Aws::SSOOIDC::Client with the latest API changes.
54
+
55
+ * Feature - Updated Aws::SSO::Client with the latest API changes.
56
+
57
+ 3.218.1 (2025-02-07)
58
+ ------------------
59
+
60
+ * Issue - Add handling of block in ExtendedSession delegation (#3178).
61
+
62
+ 3.218.0 (2025-02-06)
63
+ ------------------
64
+
65
+ * Feature - Updated Aws::STS::Client with the latest API changes.
66
+
67
+ * Feature - Updated Aws::SSOOIDC::Client with the latest API changes.
68
+
69
+ * Feature - Updated Aws::SSO::Client with the latest API changes.
70
+
71
+ 3.217.1 (2025-01-30)
72
+ ------------------
73
+
74
+ * Issue - Add `transfer-encoding` and `connection` to list of unsigned sigv4 headers.
75
+
76
+ 3.217.0 (2025-01-24)
77
+ ------------------
78
+
79
+ * Feature - Updated Aws::SSOOIDC::Client with the latest API changes.
80
+
81
+ * Feature - Fixed typos in the descriptions.
82
+
83
+ 3.216.1 (2025-01-22)
84
+ ------------------
85
+
86
+ * Issue - Use epoch seconds instead of milliseconds in cbor encode/decode.
87
+
88
+ * Issue - Add handling of block in response delegation (#3169).
89
+
90
+ 3.216.0 (2025-01-15)
91
+ ------------------
92
+
93
+ * Feature - Updated Aws::STS::Client with the latest API changes.
94
+
95
+ * Feature - Updated Aws::SSOOIDC::Client with the latest API changes.
96
+
97
+ * Feature - Updated Aws::SSO::Client with the latest API changes.
98
+
99
+ * Feature - Always calculate request checksums for operations that support or require it. Supported config options are `when_supported` and `when_required`. The default value is `when_supported`. This option is configured in code with `:request_checksum_calculation`, in the shared config file as `request_checksum_calculation`, and in the ENV as `ENV['AWS_REQUEST_CHECKSUM_CALCULATION']`.
100
+
101
+ * Feature - Always validate response checksums for operations that support or require it. Supported config options are `when_supported` and `when_required`. The default value is `when_supported`. This option is configured in code with `:response_checksum_validation`, in the shared config file as `response_checksum_validation`, and in the ENV as `ENV['AWS_RESPONSE_CHECKSUM_VALIDATION']`.
102
+
103
+ * Feature - Support CRC64NVME checksums through the `aws-crt` gem.
104
+
105
+ 3.215.1 (2025-01-14)
106
+ ------------------
107
+
108
+ * Issue - Fixed error when attempting to log an unlinked tempfile.
109
+
110
+ 3.215.0 (2025-01-10)
111
+ ------------------
112
+
113
+ * Feature - Updated Aws::STS::Client with the latest API changes.
114
+
115
+ * Feature - Fixed typos in the descriptions.
116
+
117
+ 3.214.1 (2024-12-28)
118
+ ------------------
119
+
120
+ * Issue - Fix documentation that references a non-existent method.
121
+
122
+ 3.214.0 (2024-11-25)
123
+ ------------------
124
+
125
+ * Feature - Updated configuration values for `defaults_mode`.
126
+
4
127
  3.213.0 (2024-11-14)
5
128
  ------------------
6
129
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.213.0
1
+ 3.222.3
@@ -128,8 +128,7 @@ module Aws
128
128
  "override" => 3100
129
129
  }
130
130
  },
131
- "in-region" => {
132
- },
131
+ "in-region" => {},
133
132
  "cross-region" => {
134
133
  "connectTimeoutInMillis" => {
135
134
  "override" => 3100
@@ -24,9 +24,7 @@ module Aws
24
24
  # arn.resource
25
25
  # # => foo/bar
26
26
  #
27
- # # Note: parser available for parsing resource details
28
- # @see Aws::ARNParser#parse_resource
29
- #
27
+ # @see ARNParser
30
28
  # @see https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-arns
31
29
  class ARN
32
30
 
@@ -50,6 +50,7 @@ module Aws
50
50
  end
51
51
  @client = client_opts[:client] || STS::Client.new(client_opts)
52
52
  @async_refresh = true
53
+ @metrics = ['CREDENTIALS_STS_ASSUME_ROLE']
53
54
  super
54
55
  end
55
56
 
@@ -61,6 +61,7 @@ module Aws
61
61
  @assume_role_web_identity_params[:role_session_name] = _session_name
62
62
  end
63
63
  @client = client_opts[:client] || STS::Client.new(client_opts.merge(credentials: nil))
64
+ @metrics = ['CREDENTIALS_STS_ASSUME_ROLE_WEB_ID']
64
65
  super
65
66
  end
66
67
 
@@ -61,9 +61,7 @@ module Aws
61
61
  when :tag
62
62
  case (tag = read_tag)
63
63
  when TAG_TYPE_EPOCH
64
- type = peek_type
65
64
  item = decode_item
66
- item /= 1000.0 if type == :integer
67
65
  Time.at(item)
68
66
  when TAG_TYPE_BIGNUM, TAG_TYPE_NEG_BIGNUM
69
67
  read_bignum(tag)
@@ -226,8 +226,8 @@ module Aws
226
226
 
227
227
  def add_time(value)
228
228
  head(MAJOR_TYPE_TAG, TAG_TYPE_EPOCH)
229
- epoch_ms = (value.to_f * 1000).to_i
230
- add_integer(epoch_ms)
229
+ epoch = value.to_f
230
+ add_double(epoch)
231
231
  end
232
232
 
233
233
  def bignum_to_bytes(value)
@@ -15,27 +15,11 @@ module Aws
15
15
 
16
16
  # @api private
17
17
  def setup_stubbing
18
- @stubs = {}
19
- @stub_mutex = Mutex.new
20
18
  if Hash === @config.stub_responses
21
19
  @config.stub_responses.each do |operation_name, stubs|
22
20
  apply_stubs(operation_name, Array === stubs ? stubs : [stubs])
23
21
  end
24
22
  end
25
-
26
- # When a client is stubbed allow the user to access the requests made
27
- requests = @api_requests = []
28
- requests_mutex = @requests_mutex = Mutex.new
29
- self.handle do |context|
30
- requests_mutex.synchronize do
31
- requests << {
32
- operation_name: context.operation_name,
33
- params: context.params,
34
- context: context
35
- }
36
- end
37
- @handler.call(context)
38
- end
39
23
  end
40
24
 
41
25
  # Configures what data / errors should be returned from the named operation
@@ -175,7 +159,7 @@ module Aws
175
159
  # on a client that has not enabled response stubbing via
176
160
  # `:stub_responses => true`.
177
161
  def stub_responses(operation_name, *stubs)
178
- if config.stub_responses
162
+ if @config.stub_responses
179
163
  apply_stubs(operation_name, stubs.flatten)
180
164
  else
181
165
  msg = 'stubbing is not enabled; enable stubbing in the constructor '\
@@ -194,12 +178,12 @@ module Aws
194
178
  # @raise [NotImplementedError] Raises `NotImplementedError` when the client
195
179
  # is not stubbed.
196
180
  def api_requests(options = {})
197
- if config.stub_responses
198
- @requests_mutex.synchronize do
181
+ if @config.stub_responses
182
+ @config.api_requests_mutex.synchronize do
199
183
  if options[:exclude_presign]
200
- @api_requests.reject {|req| req[:context][:presigned_url] }
184
+ @config.api_requests.reject {|req| req[:context][:presigned_url] }
201
185
  else
202
- @api_requests
186
+ @config.api_requests
203
187
  end
204
188
  end
205
189
  else
@@ -228,54 +212,44 @@ module Aws
228
212
  # @return [Structure] Returns a stubbed response data structure. The
229
213
  # actual class returned will depend on the given `operation_name`.
230
214
  def stub_data(operation_name, data = {})
231
- Stubbing::StubData.new(config.api.operation(operation_name)).stub(data)
215
+ Stubbing::StubData.new(@config.api.operation(operation_name)).stub(data)
232
216
  end
233
217
 
234
218
  # @api private
235
219
  def next_stub(context)
236
220
  operation_name = context.operation_name.to_sym
237
- stub = @stub_mutex.synchronize do
238
- stubs = @stubs[operation_name] || []
221
+ stub = @config.stubs_mutex.synchronize do
222
+ stubs = @config.stubs[operation_name] || []
239
223
  case stubs.length
240
- when 0 then default_stub(operation_name)
224
+ when 0 then stub_data(operation_name)
241
225
  when 1 then stubs.first
242
226
  else stubs.shift
243
227
  end
244
228
  end
245
- Proc === stub ? convert_stub(operation_name, stub.call(context)) : stub
229
+ stub = convert_stub(operation_name, stub, context)
230
+ stub[:mutex] = Mutex.new
231
+ stub
246
232
  end
247
233
 
248
234
  private
249
235
 
250
- def default_stub(operation_name)
251
- stub = stub_data(operation_name)
252
- http_response_stub(operation_name, stub)
236
+ def apply_stubs(operation_name, stubs)
237
+ @config.stubs_mutex.synchronize do
238
+ @config.stubs[operation_name.to_sym] = stubs
239
+ end
253
240
  end
254
241
 
255
242
  # This method converts the given stub data and converts it to a
256
243
  # HTTP response (when possible). This enables the response stubbing
257
244
  # plugin to provide a HTTP response that triggers all normal events
258
245
  # during response handling.
259
- def apply_stubs(operation_name, stubs)
260
- @stub_mutex.synchronize do
261
- @stubs[operation_name.to_sym] = stubs.map do |stub|
262
- convert_stub(operation_name, stub)
263
- end
264
- end
265
- end
266
-
267
- def convert_stub(operation_name, stub)
268
- stub = case stub
269
- when Proc then stub
246
+ def convert_stub(operation_name, stub, context)
247
+ case stub
248
+ when Proc then convert_stub(operation_name, stub.call(context), context)
270
249
  when Exception, Class then { error: stub }
271
250
  when String then service_error_stub(stub)
272
- when Hash then http_response_stub(operation_name, stub)
273
- else { data: stub }
274
- end
275
- if Hash === stub
276
- stub[:mutex] = Mutex.new
251
+ else http_response_stub(operation_name, stub)
277
252
  end
278
- stub
279
253
  end
280
254
 
281
255
  def service_error_stub(error_code)
@@ -299,14 +273,14 @@ module Aws
299
273
  end
300
274
 
301
275
  def data_to_http_resp(operation_name, data)
302
- api = config.api
276
+ api = @config.api
303
277
  operation = api.operation(operation_name)
304
278
  ParamValidator.new(operation.output, input: false).validate!(data)
305
279
  protocol_helper.stub_data(api, operation, data)
306
280
  end
307
281
 
308
282
  def protocol_helper
309
- case config.api.metadata['protocol']
283
+ case @config.api.metadata['protocol']
310
284
  when 'json' then Stubbing::Protocols::Json
311
285
  when 'rest-json' then Stubbing::Protocols::RestJson
312
286
  when 'rest-xml' then Stubbing::Protocols::RestXml
@@ -9,6 +9,10 @@ module Aws
9
9
  # @return [Time]
10
10
  attr_reader :expiration
11
11
 
12
+ # @api private
13
+ # Returns UserAgent metrics for credentials.
14
+ attr_accessor :metrics
15
+
12
16
  # @return [Boolean]
13
17
  def set?
14
18
  !!@credentials && @credentials.set?
@@ -42,12 +42,14 @@ module Aws
42
42
 
43
43
  def static_credentials(options)
44
44
  if options[:config]
45
- Credentials.new(
45
+ creds = Credentials.new(
46
46
  options[:config].access_key_id,
47
47
  options[:config].secret_access_key,
48
48
  options[:config].session_token,
49
49
  account_id: options[:config].account_id
50
50
  )
51
+ creds.metrics = ['CREDENTIALS_PROFILE']
52
+ creds
51
53
  end
52
54
  end
53
55
 
@@ -76,7 +78,9 @@ module Aws
76
78
 
77
79
  def static_profile_credentials(options)
78
80
  if options[:config] && options[:config].profile
79
- SharedCredentials.new(profile_name: options[:config].profile)
81
+ creds = SharedCredentials.new(profile_name: options[:config].profile)
82
+ creds.metrics = ['CREDENTIALS_PROFILE']
83
+ creds
80
84
  end
81
85
  rescue Errors::NoSuchProfileError
82
86
  nil
@@ -85,7 +89,11 @@ module Aws
85
89
  def static_profile_process_credentials(options)
86
90
  if Aws.shared_config.config_enabled? && options[:config] && options[:config].profile
87
91
  process_provider = Aws.shared_config.credential_process(profile: options[:config].profile)
88
- ProcessCredentials.new([process_provider]) if process_provider
92
+ if process_provider
93
+ creds = ProcessCredentials.new([process_provider])
94
+ creds.metrics << 'CREDENTIALS_PROFILE_PROCESS'
95
+ creds
96
+ end
89
97
  end
90
98
  rescue Errors::NoSuchProfileError
91
99
  nil
@@ -96,12 +104,14 @@ module Aws
96
104
  secret = %w[AWS_SECRET_ACCESS_KEY AMAZON_SECRET_ACCESS_KEY AWS_SECRET_KEY]
97
105
  token = %w[AWS_SESSION_TOKEN AMAZON_SESSION_TOKEN]
98
106
  account_id = %w[AWS_ACCOUNT_ID]
99
- Credentials.new(
107
+ creds = Credentials.new(
100
108
  envar(key),
101
109
  envar(secret),
102
110
  envar(token),
103
111
  account_id: envar(account_id)
104
112
  )
113
+ creds.metrics = ['CREDENTIALS_ENV_VARS']
114
+ creds
105
115
  end
106
116
 
107
117
  def envar(keys)
@@ -117,7 +127,9 @@ module Aws
117
127
 
118
128
  def shared_credentials(options)
119
129
  profile_name = determine_profile_name(options)
120
- SharedCredentials.new(profile_name: profile_name)
130
+ creds = SharedCredentials.new(profile_name: profile_name)
131
+ creds.metrics = ['CREDENTIALS_PROFILE']
132
+ creds
121
133
  rescue Errors::NoSuchProfileError
122
134
  nil
123
135
  end
@@ -126,7 +138,11 @@ module Aws
126
138
  profile_name = determine_profile_name(options)
127
139
  if Aws.shared_config.config_enabled?
128
140
  process_provider = Aws.shared_config.credential_process(profile: profile_name)
129
- ProcessCredentials.new([process_provider]) if process_provider
141
+ if process_provider
142
+ creds = ProcessCredentials.new([process_provider])
143
+ creds.metrics << 'CREDENTIALS_PROFILE_PROCESS'
144
+ creds
145
+ end
130
146
  end
131
147
  rescue Errors::NoSuchProfileError
132
148
  nil
@@ -156,7 +172,11 @@ module Aws
156
172
  role_session_name: ENV['AWS_ROLE_SESSION_NAME']
157
173
  }
158
174
  cfg[:region] = region if region
159
- AssumeRoleWebIdentityCredentials.new(cfg)
175
+ Aws::Plugins::UserAgent.metric('CREDENTIALS_ENV_VARS_STS_WEB_ID_TOKEN') do
176
+ creds = AssumeRoleWebIdentityCredentials.new(cfg)
177
+ creds.metrics << 'CREDENTIALS_ENV_VARS_STS_WEB_ID_TOKEN'
178
+ creds
179
+ end
160
180
  elsif Aws.shared_config.config_enabled?
161
181
  profile = options[:config].profile if options[:config]
162
182
  Aws.shared_config.assume_role_web_identity_credentials_from_config(
@@ -14,6 +14,7 @@ module Aws
14
14
  @secret_access_key = secret_access_key
15
15
  @session_token = session_token
16
16
  @account_id = kwargs[:account_id]
17
+ @metrics = ['CREDENTIALS_CODE']
17
18
  end
18
19
 
19
20
  # @return [String]
@@ -28,6 +29,11 @@ module Aws
28
29
  # @return [String, nil]
29
30
  attr_reader :account_id
30
31
 
32
+ # @api private
33
+ # Returns the credentials source. Used for tracking credentials
34
+ # related UserAgent metrics.
35
+ attr_accessor :metrics
36
+
31
37
  # @return [Credentials]
32
38
  def credentials
33
39
  self
@@ -77,6 +77,7 @@ module Aws
77
77
  @http_debug_output = options[:http_debug_output]
78
78
  @backoff = backoff(options[:backoff])
79
79
  @async_refresh = false
80
+ @metrics = ['CREDENTIALS_HTTP']
80
81
  super
81
82
  end
82
83
 
@@ -68,7 +68,7 @@ module Aws
68
68
  end
69
69
  end
70
70
 
71
- # Rasied when endpoint discovery failed for operations
71
+ # Raised when endpoint discovery failed for operations
72
72
  # that requires endpoints from endpoint discovery
73
73
  class EndpointDiscoveryError < RuntimeError
74
74
  def initialize(*args)
@@ -78,7 +78,7 @@ module Aws
78
78
  end
79
79
  end
80
80
 
81
- # raised when hostLabel member is not provided
81
+ # Raised when hostLabel member is not provided
82
82
  # at operation input when endpoint trait is available
83
83
  # with 'hostPrefix' requirement
84
84
  class MissingEndpointHostLabelValue < RuntimeError
@@ -90,6 +90,7 @@ module Aws
90
90
  @token = nil
91
91
  @no_refresh_until = nil
92
92
  @async_refresh = false
93
+ @metrics = ['CREDENTIALS_IMDS']
93
94
  super
94
95
  end
95
96
 
@@ -51,13 +51,17 @@ module Aws
51
51
  when String then summarize_string(value)
52
52
  when Hash then '{' + summarize_hash(value) + '}'
53
53
  when Array then summarize_array(value)
54
- when File then summarize_file(value.path)
55
- when Pathname then summarize_file(value)
54
+ when File then summarize_file(value)
55
+ when Pathname then summarize_filepath(value)
56
56
  else value.inspect
57
57
  end
58
58
  end
59
59
 
60
- def summarize_file(path)
60
+ def summarize_file(file)
61
+ "#<File:#{file.path} (#{file.size} bytes)>"
62
+ end
63
+
64
+ def summarize_filepath(path)
61
65
  "#<File:#{path} (#{File.size(path)} bytes)>"
62
66
  end
63
67