aws-sdk-s3 1.209.0 → 1.210.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
  SHA256:
3
- metadata.gz: 96d905ca855eb2dbe7fc73b47740d9b107cd13d54248e50cd04c42c9b1cbec06
4
- data.tar.gz: f47c0a2b631896eb327368850ba7b2d8e57cbfb4b31ac910b197488bc699deda
3
+ metadata.gz: 001f68c0fd317a05aecab1cd12673833d3321e9fdbf7f96bd0daf4e02030f305
4
+ data.tar.gz: 27da581457ae45f288dec7f06ec74f088cf6593fa2eb788c2821ec3ee53574ea
5
5
  SHA512:
6
- metadata.gz: 491de1ec6c39f3a6b85fe3da244ad15f30865e44ca357289a8edbeffefe08eeb3794626827293c45e0c5365864db4eebcbec64b757ea287c3176feb5b69299ac
7
- data.tar.gz: cb89af8f3d16403d37cbcab90b9b51de1c859bfe8eb689eededbbfd8efdbffc580acd16f2a7594bf75916497cac959325436562bcb2f5b90ec1a600f40765cf1
6
+ metadata.gz: 79e664dd1704d0bfe1c45cbddc72790e1d38ccd1d2b567b8442709feb07872eeafcb2160ecbd976d5e037a8c8ecdf904e5fbbd02295685ca43b192c2d4d7b3de
7
+ data.tar.gz: 1e9dfe900fcc03eb10a8b63a8393890a6b281bf469fc3e0e8c661c9318171726a6fd8edd871376455b8754df9aba636dc1f58f1b1bb1b9b322ddc693af2f20c0
data/CHANGELOG.md CHANGED
@@ -1,6 +1,15 @@
1
1
  Unreleased Changes
2
2
  ------------------
3
3
 
4
+ 1.210.0 (2026-01-05)
5
+ ------------------
6
+
7
+ * Feature - Code Generated Changes, see `./build_tools` or `aws-sdk-core`'s CHANGELOG.md for details.
8
+
9
+ * Feature - Added `:http_chunk_size` parameter to `TransferManager#upload_file` to control the buffer size when streaming request bodies over HTTP. Larger chunk sizes may improve network throughput at the cost of higher memory usage (Ruby MRI only).
10
+
11
+ * Feature - Improved memory efficiency when calculating request checksums for large file uploads (Ruby MRI only).
12
+
4
13
  1.209.0 (2025-12-23)
5
14
  ------------------
6
15
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.209.0
1
+ 1.210.0
@@ -17659,7 +17659,7 @@ module Aws::S3
17659
17659
  # [3]: https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-using-rest-api.html
17660
17660
  # [4]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html
17661
17661
  #
17662
- # @option params [String, StringIO, File] :body
17662
+ # @option params [String, IO] :body
17663
17663
  # Object data.
17664
17664
  #
17665
17665
  # @option params [required, String] :bucket
@@ -20968,7 +20968,7 @@ module Aws::S3
20968
20968
  # [16]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html
20969
20969
  # [17]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html
20970
20970
  #
20971
- # @option params [String, StringIO, File] :body
20971
+ # @option params [String, IO] :body
20972
20972
  # Object data.
20973
20973
  #
20974
20974
  # @option params [required, String] :bucket
@@ -22283,7 +22283,7 @@ module Aws::S3
22283
22283
  tracer: tracer
22284
22284
  )
22285
22285
  context[:gem_name] = 'aws-sdk-s3'
22286
- context[:gem_version] = '1.209.0'
22286
+ context[:gem_version] = '1.210.0'
22287
22287
  Seahorse::Client::Request.new(handlers, context)
22288
22288
  end
22289
22289
 
@@ -4121,6 +4121,7 @@ module Aws::S3
4121
4121
  "requestAlgorithmMember" => "checksum_algorithm",
4122
4122
  "requestChecksumRequired" => false,
4123
4123
  }
4124
+ o['unsignedPayload'] = true
4124
4125
  o.input = Shapes::ShapeRef.new(shape: PutObjectRequest)
4125
4126
  o.output = Shapes::ShapeRef.new(shape: PutObjectOutput)
4126
4127
  o.errors << Shapes::ShapeRef.new(shape: InvalidRequest)
@@ -4309,6 +4310,7 @@ module Aws::S3
4309
4310
  "requestAlgorithmMember" => "checksum_algorithm",
4310
4311
  "requestChecksumRequired" => false,
4311
4312
  }
4313
+ o['unsignedPayload'] = true
4312
4314
  o.input = Shapes::ShapeRef.new(shape: UploadPartRequest)
4313
4315
  o.output = Shapes::ShapeRef.new(shape: UploadPartOutput)
4314
4316
  end)
@@ -15,6 +15,7 @@ module Aws
15
15
  def initialize(options = {})
16
16
  @client = options[:client] || Client.new
17
17
  @executor = options[:executor]
18
+ @http_chunk_size = options[:http_chunk_size]
18
19
  @multipart_threshold = options[:multipart_threshold] || DEFAULT_MULTIPART_THRESHOLD
19
20
  end
20
21
 
@@ -37,7 +38,11 @@ module Aws
37
38
  def upload(source, options = {})
38
39
  Aws::Plugins::UserAgent.metric('S3_TRANSFER') do
39
40
  if File.size(source) >= @multipart_threshold
40
- MultipartFileUploader.new(client: @client, executor: @executor).upload(source, options)
41
+ MultipartFileUploader.new(
42
+ client: @client,
43
+ executor: @executor,
44
+ http_chunk_size: @http_chunk_size
45
+ ).upload(source, options)
41
46
  else
42
47
  put_object(source, options)
43
48
  end
@@ -59,7 +64,10 @@ module Aws
59
64
  options[:on_chunk_sent] = single_part_progress(callback)
60
65
  end
61
66
  open_file(source) do |file|
67
+ Thread.current[:net_http_override_body_stream_chunk] = @http_chunk_size if @http_chunk_size
62
68
  @client.put_object(options.merge(body: file))
69
+ ensure
70
+ Thread.current[:net_http_override_body_stream_chunk] = nil
63
71
  end
64
72
  end
65
73
 
@@ -22,6 +22,7 @@ module Aws
22
22
  def initialize(options = {})
23
23
  @client = options[:client] || Client.new
24
24
  @executor = options[:executor]
25
+ @http_chunk_size = options[:http_chunk_size]
25
26
  end
26
27
 
27
28
  # @return [Client]
@@ -78,7 +79,7 @@ module Aws
78
79
  rescue MultipartUploadError => e
79
80
  raise e
80
81
  rescue StandardError => e
81
- msg = "failed to abort multipart upload: #{e.message}. " \
82
+ msg = "failed to abort multipart upload: #{e&.message}. " \
82
83
  "Multipart upload failed: #{errors.map(&:message).join('; ')}"
83
84
  raise MultipartUploadError.new(msg, errors + [e])
84
85
  end
@@ -150,6 +151,7 @@ module Aws
150
151
 
151
152
  upload_attempts += 1
152
153
  @executor.post(part) do |p|
154
+ Thread.current[:net_http_override_body_stream_chunk] = @http_chunk_size if @http_chunk_size
153
155
  update_progress(progress, p)
154
156
  resp = @client.upload_part(p)
155
157
  p[:body].close
@@ -160,6 +162,7 @@ module Aws
160
162
  abort_upload = true
161
163
  errors << e
162
164
  ensure
165
+ Thread.current[:net_http_override_body_stream_chunk] = nil if @http_chunk_size
163
166
  completion_queue << :done
164
167
  end
165
168
  end
@@ -205,6 +205,11 @@ module Aws
205
205
  # @option options [Integer] :thread_count (10) Customize threads used in the multipart upload.
206
206
  # Only used when no custom executor is provided (creates {DefaultExecutor} with the given thread count).
207
207
  #
208
+ # @option option [Integer] :http_chunk_size (16384) Size in bytes for each chunk when streaming request bodies
209
+ # over HTTP. Controls the buffer size used when sending data to S3. Larger values may improve throughput by
210
+ # reducing the number of network writes, but use more memory. Custom values must be at least 16KB.
211
+ # Only Ruby MRI is supported.
212
+ #
208
213
  # @option options [Proc] :progress_callback (nil)
209
214
  # A Proc that will be called when each chunk of the upload is sent.
210
215
  # It will be invoked with `[bytes_read]` and `[total_sizes]`.
@@ -221,9 +226,22 @@ module Aws
221
226
  # @see Client#upload_part
222
227
  def upload_file(source, bucket:, key:, **options)
223
228
  upload_opts = options.merge(bucket: bucket, key: key)
229
+ http_chunk_size =
230
+ if defined?(JRUBY_VERSION)
231
+ nil
232
+ else
233
+ chunk = upload_opts.delete(:http_chunk_size)
234
+ if chunk && chunk < Aws::Plugins::ChecksumAlgorithm::DEFAULT_TRAILER_CHUNK_SIZE
235
+ raise ArgumentError, ':http_chunk_size must be at least 16384 bytes (16KB)'
236
+ end
237
+
238
+ chunk
239
+ end
240
+
224
241
  executor = @executor || DefaultExecutor.new(max_threads: upload_opts.delete(:thread_count))
225
242
  uploader = FileUploader.new(
226
243
  multipart_threshold: upload_opts.delete(:multipart_threshold),
244
+ http_chunk_size: http_chunk_size,
227
245
  client: @client,
228
246
  executor: executor
229
247
  )
data/lib/aws-sdk-s3.rb CHANGED
@@ -75,7 +75,7 @@ module Aws::S3
75
75
  autoload :ObjectVersion, 'aws-sdk-s3/object_version'
76
76
  autoload :EventStreams, 'aws-sdk-s3/event_streams'
77
77
 
78
- GEM_VERSION = '1.209.0'
78
+ GEM_VERSION = '1.210.0'
79
79
 
80
80
  end
81
81
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-sdk-s3
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.209.0
4
+ version: 1.210.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amazon Web Services
@@ -46,7 +46,7 @@ dependencies:
46
46
  version: '3'
47
47
  - - ">="
48
48
  - !ruby/object:Gem::Version
49
- version: 3.234.0
49
+ version: 3.241.0
50
50
  type: :runtime
51
51
  prerelease: false
52
52
  version_requirements: !ruby/object:Gem::Requirement
@@ -56,7 +56,7 @@ dependencies:
56
56
  version: '3'
57
57
  - - ">="
58
58
  - !ruby/object:Gem::Version
59
- version: 3.234.0
59
+ version: 3.241.0
60
60
  description: Official AWS Ruby gem for Amazon Simple Storage Service (Amazon S3).
61
61
  This gem is part of the AWS SDK for Ruby.
62
62
  email: