aws-sdk-s3 1.93.0 → 1.93.1
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 +4 -4
- data/CHANGELOG.md +7 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-s3.rb +1 -1
- data/lib/aws-sdk-s3/arn/access_point_arn.rb +2 -4
- data/lib/aws-sdk-s3/arn/object_lambda_arn.rb +2 -4
- data/lib/aws-sdk-s3/arn/outpost_access_point_arn.rb +1 -3
- data/lib/aws-sdk-s3/client.rb +1 -1
- data/lib/aws-sdk-s3/file_uploader.rb +2 -2
- data/lib/aws-sdk-s3/plugins/arn.rb +37 -21
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9720f4044b674d912ad1b52f866a0d433358503dd6cf4d8aa11391619674a15d
|
4
|
+
data.tar.gz: 6e6ddada3db5629e08660364136608876ce4bac0076ad31a203dd90d9ad52c17
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 769072321971f35f4fc668628908f9efeb4565a90a7aa1575fe71b59d01e6049899e48d468c59dd2fb540cdccb5fbe5de70dacebbc2081fd578a326cf5a93d23
|
7
|
+
data.tar.gz: 449f8325e0e316b16cff1e0fef1e108072cd5aade0eb4581db803645d9568fb925b6472ae95d6694666b819cb4606830a6d7606d71a476b077d4af66e80ba4fd
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,13 @@
|
|
1
1
|
Unreleased Changes
|
2
2
|
------------------
|
3
3
|
|
4
|
+
1.93.1 (2021-04-12)
|
5
|
+
------------------
|
6
|
+
|
7
|
+
* Issue - Fix FIPS and global endpoint behavior for S3 ARNs.
|
8
|
+
|
9
|
+
* Issue - Increases `multipart_threshold` default from 15 megabytes to 100 megabytes.
|
10
|
+
|
4
11
|
1.93.0 (2021-03-24)
|
5
12
|
------------------
|
6
13
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.93.
|
1
|
+
1.93.1
|
data/lib/aws-sdk-s3.rb
CHANGED
@@ -9,8 +9,6 @@ module Aws
|
|
9
9
|
@type, @access_point_name, @extra = @resource.split(/[:,\/]/)
|
10
10
|
end
|
11
11
|
|
12
|
-
attr_reader :access_point_name
|
13
|
-
|
14
12
|
def support_dualstack?
|
15
13
|
true
|
16
14
|
end
|
@@ -52,13 +50,13 @@ module Aws
|
|
52
50
|
end
|
53
51
|
end
|
54
52
|
|
55
|
-
def host_url(region, dualstack = false, custom_endpoint = nil)
|
53
|
+
def host_url(region, fips = false, dualstack = false, custom_endpoint = nil)
|
56
54
|
pfx = "#{@access_point_name}-#{@account_id}"
|
57
55
|
if custom_endpoint
|
58
56
|
"#{pfx}.#{custom_endpoint}"
|
59
57
|
else
|
60
58
|
sfx = Aws::Partitions::EndpointProvider.dns_suffix_for(region)
|
61
|
-
"#{pfx}.s3-accesspoint#{'.dualstack' if dualstack}.#{region}.#{sfx}"
|
59
|
+
"#{pfx}.s3-accesspoint#{'-fips' if fips}#{'.dualstack' if dualstack}.#{region}.#{sfx}"
|
62
60
|
end
|
63
61
|
end
|
64
62
|
end
|
@@ -9,8 +9,6 @@ module Aws
|
|
9
9
|
@type, @access_point_name, @extra = @resource.split(/[:,\/]/)
|
10
10
|
end
|
11
11
|
|
12
|
-
attr_reader :access_point_name
|
13
|
-
|
14
12
|
def support_dualstack?
|
15
13
|
false
|
16
14
|
end
|
@@ -52,13 +50,13 @@ module Aws
|
|
52
50
|
end
|
53
51
|
end
|
54
52
|
|
55
|
-
def host_url(region, _dualstack = false, custom_endpoint = nil)
|
53
|
+
def host_url(region, fips = false, _dualstack = false, custom_endpoint = nil)
|
56
54
|
pfx = "#{@access_point_name}-#{@account_id}"
|
57
55
|
if custom_endpoint
|
58
56
|
"#{pfx}.#{custom_endpoint}"
|
59
57
|
else
|
60
58
|
sfx = Aws::Partitions::EndpointProvider.dns_suffix_for(region)
|
61
|
-
"#{pfx}.s3-object-lambda.#{region}.#{sfx}"
|
59
|
+
"#{pfx}.s3-object-lambda#{'-fips' if fips}.#{region}.#{sfx}"
|
62
60
|
end
|
63
61
|
end
|
64
62
|
end
|
@@ -10,8 +10,6 @@ module Aws
|
|
10
10
|
@resource.split(/[:,\/]/)
|
11
11
|
end
|
12
12
|
|
13
|
-
attr_reader :outpost_id, :access_point_name
|
14
|
-
|
15
13
|
def support_dualstack?
|
16
14
|
false
|
17
15
|
end
|
@@ -62,7 +60,7 @@ module Aws
|
|
62
60
|
end
|
63
61
|
|
64
62
|
# Outpost ARNs currently do not support dualstack
|
65
|
-
def host_url(region, _dualstack = false, custom_endpoint = nil)
|
63
|
+
def host_url(region, _fips = false, _dualstack = false, custom_endpoint = nil)
|
66
64
|
pfx = "#{@access_point_name}-#{@account_id}.#{@outpost_id}"
|
67
65
|
if custom_endpoint
|
68
66
|
"#{pfx}.#{custom_endpoint}"
|
data/lib/aws-sdk-s3/client.rb
CHANGED
@@ -13910,7 +13910,7 @@ module Aws::S3
|
|
13910
13910
|
params: params,
|
13911
13911
|
config: config)
|
13912
13912
|
context[:gem_name] = 'aws-sdk-s3'
|
13913
|
-
context[:gem_version] = '1.93.
|
13913
|
+
context[:gem_version] = '1.93.1'
|
13914
13914
|
Seahorse::Client::Request.new(handlers, context)
|
13915
13915
|
end
|
13916
13916
|
|
@@ -7,7 +7,7 @@ module Aws
|
|
7
7
|
# @api private
|
8
8
|
class FileUploader
|
9
9
|
|
10
|
-
|
10
|
+
ONE_HUNDRED_MEGABYTES = 100 * 1024 * 1024
|
11
11
|
|
12
12
|
# @param [Hash] options
|
13
13
|
# @option options [Client] :client
|
@@ -16,7 +16,7 @@ module Aws
|
|
16
16
|
@options = options
|
17
17
|
@client = options[:client] || Client.new
|
18
18
|
@multipart_threshold = options[:multipart_threshold] ||
|
19
|
-
|
19
|
+
ONE_HUNDRED_MEGABYTES
|
20
20
|
end
|
21
21
|
|
22
22
|
# @return [Client]
|
@@ -39,6 +39,7 @@ be made. Set to `false` to use the client's region instead.
|
|
39
39
|
context.http_request.endpoint,
|
40
40
|
context.metadata[:s3_arn][:arn],
|
41
41
|
context.metadata[:s3_arn][:resolved_region],
|
42
|
+
context.metadata[:s3_arn][:fips],
|
42
43
|
context.metadata[:s3_arn][:dualstack],
|
43
44
|
# if regional_endpoint is false, a custom endpoint was provided
|
44
45
|
# in this case, we want to prefix the endpoint using the ARN
|
@@ -63,9 +64,17 @@ be made. Set to `false` to use the client's region instead.
|
|
63
64
|
if arn
|
64
65
|
validate_config!(context, arn)
|
65
66
|
|
67
|
+
fips = false
|
68
|
+
if resolved_region.include?('fips')
|
69
|
+
fips = true
|
70
|
+
resolved_region = resolved_region.gsub('fips-', '')
|
71
|
+
.gsub('-fips', '')
|
72
|
+
end
|
73
|
+
|
66
74
|
context.metadata[:s3_arn] = {
|
67
75
|
arn: arn,
|
68
76
|
resolved_region: resolved_region,
|
77
|
+
fips: fips,
|
69
78
|
dualstack: extract_dualstack_config!(context)
|
70
79
|
}
|
71
80
|
end
|
@@ -118,7 +127,7 @@ be made. Set to `false` to use the client's region instead.
|
|
118
127
|
s3_arn = resolve_arn_type!(arn)
|
119
128
|
s3_arn.validate_arn!
|
120
129
|
validate_region_config!(s3_arn, region, use_arn_region)
|
121
|
-
region = s3_arn.region if use_arn_region
|
130
|
+
region = s3_arn.region if use_arn_region && !region.include?('fips')
|
122
131
|
[region, s3_arn]
|
123
132
|
else
|
124
133
|
[region]
|
@@ -126,9 +135,9 @@ be made. Set to `false` to use the client's region instead.
|
|
126
135
|
end
|
127
136
|
|
128
137
|
# @api private
|
129
|
-
def resolve_url!(url, arn, region, dualstack = false, has_custom_endpoint = false)
|
138
|
+
def resolve_url!(url, arn, region, fips = false, dualstack = false, has_custom_endpoint = false)
|
130
139
|
custom_endpoint = url.host if has_custom_endpoint
|
131
|
-
url.host = arn.host_url(region, dualstack, custom_endpoint)
|
140
|
+
url.host = arn.host_url(region, fips, dualstack, custom_endpoint)
|
132
141
|
url.path = url_path(url.path, arn)
|
133
142
|
url
|
134
143
|
end
|
@@ -174,33 +183,40 @@ be made. Set to `false` to use the client's region instead.
|
|
174
183
|
end
|
175
184
|
|
176
185
|
def validate_region_config!(arn, region, use_arn_region)
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
(region == 's3-external-1' || region == 'aws-global')
|
183
|
-
if !fips && arn.region.include?('fips')
|
184
|
-
raise ArgumentError,
|
185
|
-
'FIPS region ARNs are not supported for this type of ARN.'
|
186
|
+
if ['s3-external-1', 'aws-global'].include?(region)
|
187
|
+
# These "regions" are not regional endpoints
|
188
|
+
unless use_arn_region
|
189
|
+
raise Aws::Errors::InvalidARNRegionError,
|
190
|
+
'Configured client region is not a regional endpoint.'
|
186
191
|
end
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
'ARN without `:s3_use_arn_region`.'
|
192
|
+
# These "regions" are in the AWS partition
|
193
|
+
# Cannot use ARN region unless it's the same partition
|
194
|
+
unless arn.partition == 'aws'
|
195
|
+
raise Aws::Errors::InvalidARNPartitionError
|
192
196
|
end
|
193
|
-
|
194
|
-
|
195
|
-
|
197
|
+
else
|
198
|
+
if region.include?('fips')
|
199
|
+
# If ARN type doesn't support FIPS but the client region is FIPS
|
200
|
+
unless arn.support_fips?
|
201
|
+
raise ArgumentError,
|
202
|
+
'FIPS client regions are not supported for this type '\
|
203
|
+
'of ARN.'
|
204
|
+
end
|
205
|
+
|
206
|
+
fips = true
|
207
|
+
# Normalize the region so we can compare partition and regions
|
196
208
|
region = region.gsub('fips-', '').gsub('-fips', '')
|
197
209
|
end
|
210
|
+
|
211
|
+
# Raise if the ARN and client regions are in different partitions
|
198
212
|
if use_arn_region &&
|
199
213
|
!Aws::Partitions.partition(arn.partition).region?(region)
|
200
214
|
raise Aws::Errors::InvalidARNPartitionError
|
201
215
|
end
|
202
216
|
|
203
|
-
|
217
|
+
# Raise if regions mismatch
|
218
|
+
# Either when it's a fips client or not using the ARN region
|
219
|
+
if (!use_arn_region || fips) && region != arn.region
|
204
220
|
raise Aws::Errors::InvalidARNRegionError
|
205
221
|
end
|
206
222
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aws-sdk-s3
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.93.
|
4
|
+
version: 1.93.1
|
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: 2021-
|
11
|
+
date: 2021-04-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-kms
|