aws-sdk-core 3.15.0 → 3.16.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 51ca18c7c6cfe9903c4949e724b4d874a825be17
4
- data.tar.gz: 5a1c06541653722c5b681701e15ed5d9cd711948
3
+ metadata.gz: 9c0ed04e344f8b8d148ad29c32aa5dce229e813d
4
+ data.tar.gz: 1e6826559216d061dddcf9b0eceaf9908ad87486
5
5
  SHA512:
6
- metadata.gz: 5d1572776dc325243e67f0ab764b797547f3b2ed66696ce9da3bc31bceab9301ff4deeba74c19f3e962a1b008aee047d221330fc3a9f14d591783c0d258f9758
7
- data.tar.gz: 074bebca61c78ca58338d60395703c2994a7dc2aa293596bbf29a168a31ae5c98f51ffb44063f9471326c68dbd156b8e6a37b36fd58d425097dcb533b0cb73a7
6
+ metadata.gz: fec3fb521ce71d2a57213e103d3ac496f4fc9858ca56d3f585da64a5e2e44400fdb21dfabf19f131ba4ef0765eda3ea4089685a099467478789b0cd650af0b74
7
+ data.tar.gz: dbd9f1b1789ddec21207597115ac5f3f3cb5f966257bc181c3ae4d524fab586f5290f340380d4225a4a326436e15fa720fdaafb45d969f4775e0450e616d883a
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.15.0
1
+ 3.16.0
@@ -83,19 +83,28 @@ module Aws
83
83
  def get_credentials
84
84
  # Retry loading credentials a configurable number of times if
85
85
  # the instance metadata service is not responding.
86
- begin
87
- retry_errors(NETWORK_ERRORS, max_retries: @retries) do
88
- open_connection do |conn|
89
- path = '/latest/meta-data/iam/security-credentials/'
90
- profile_name = http_get(conn, path).lines.first.strip
91
- http_get(conn, path + profile_name)
86
+ if _metadata_disabled?
87
+ '{}'
88
+ else
89
+ begin
90
+ retry_errors(NETWORK_ERRORS, max_retries: @retries) do
91
+ open_connection do |conn|
92
+ path = '/latest/meta-data/iam/security-credentials/'
93
+ profile_name = http_get(conn, path).lines.first.strip
94
+ http_get(conn, path + profile_name)
95
+ end
92
96
  end
97
+ rescue
98
+ '{}'
93
99
  end
94
- rescue
95
- '{}'
96
100
  end
97
101
  end
98
102
 
103
+ def _metadata_disabled?
104
+ flag = ENV["AWS_EC2_METADATA_DISABLED"]
105
+ !flag.nil? && flag.downcase == "true"
106
+ end
107
+
99
108
  def open_connection
100
109
  http = Net::HTTP.new(@ip_address, @port, nil)
101
110
  http.open_timeout = @http_open_timeout
@@ -40,6 +40,6 @@ require_relative 'aws-sdk-sts/customizations'
40
40
  # @service
41
41
  module Aws::STS
42
42
 
43
- GEM_VERSION = '3.15.0'
43
+ GEM_VERSION = '3.16.0'
44
44
 
45
45
  end
@@ -1407,7 +1407,7 @@ module Aws::STS
1407
1407
  params: params,
1408
1408
  config: config)
1409
1409
  context[:gem_name] = 'aws-sdk-core'
1410
- context[:gem_version] = '3.15.0'
1410
+ context[:gem_version] = '3.16.0'
1411
1411
  Seahorse::Client::Request.new(handlers, context)
1412
1412
  end
1413
1413
 
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.15.0
4
+ version: 3.16.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: 2018-02-06 00:00:00.000000000 Z
11
+ date: 2018-02-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jmespath