Skip to content

Commit 62fdb58

Browse files
Update Design and Decision log for Multipart download for pre-signed URL
1 parent 6ffda0b commit 62fdb58

File tree

2 files changed

+34
-1
lines changed

2 files changed

+34
-1
lines changed

docs/design/core/presignedURL-Get/DecisionLog.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,3 +53,10 @@ The team has decided to implement functionality only for S3 async client and def
5353
2. Remove the consumer builder pattern from Get Request Model.
5454

5555
3. throw UnsupportedOperationException for Multipart S3 Client and S3 CRT Client for now.
56+
57+
## Design Review: 07/31/2025
58+
**Source**: Design : Multipart Download Support for Pre-signed URLs
59+
**Attendees**: John Viegas, Zoe Wang, Dongie Agnir, Bole Yi, Ran Vaknin, Saranya Somepalli, David Ho, Olivier Lepage Applin
60+
61+
### Decision Addressed
62+
Initially considered separate discovery request (bytes=0-0) followed by download, but decided to follow AWS Transfer Manager SEP specification using Range: bytes=0-{partSizeInBytes-1} to download first part AND discover total object size simultaneously from Content-Range header response.

docs/design/core/presignedURL-Get/Design.md

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ The Java SDK team has decided to implement a separate `AsyncPresignedUrlExtensio
1616

1717
The design introduces a new helper API `AsyncPresignedUrlExtension` which can be instantiated via the existing `S3AsyncClient`. This extension provides a clean abstraction layer that preserves SDK benefits while handling the unique requirements of pre-signed URL requests.
1818

19-
This design will implement only the GET /download function for presigned URLs for the S3AsyncClient. The synchronous S3Client implementation is deferred to future work.
19+
This design implements GET/download functionality for presigned URLs for the S3AsyncClient, including multipart download support for large objects. The synchronous S3Client implementation is deferred to future work.
2020

2121

2222

@@ -48,6 +48,32 @@ AsyncPresignedUrlExtension presignedUrlExtension = s3Client.presignedUrlExtensio
4848
CompletableFuture<GetObjectResponse> response = presignedUrlExtension.getObject(request, AsyncResponseTransformer.toBytes());
4949
```
5050

51+
### Multipart Download Support
52+
53+
For objects with size greater than minimumPartSizeInBytes, the SDK automatically uses multipart downloads with HTTP Range headers when multipart is enabled:
54+
55+
```java
56+
// Enable multipart downloads
57+
S3AsyncClient s3Client = S3AsyncClient.builder()
58+
.multipartEnabled(true)
59+
.build();
60+
61+
// Or with custom configuration
62+
MultipartConfiguration config = MultipartConfiguration.builder()
63+
.minimumPartSizeInBytes(8 * 1024 * 1024) // 8MB parts
64+
.build();
65+
66+
S3AsyncClient multipartClient = S3AsyncClient.builder()
67+
.multipartConfiguration(config)
68+
.build();
69+
70+
// Download automatically uses multipart for objects larger than the configured part size
71+
CompletableFuture<ResponseBytes<GetObjectResponse>> response =
72+
multipartClient.presignedUrlExtension().getObject(request, AsyncResponseTransformer.toBytes());
73+
```
74+
75+
The multipart implementation uses Range headers (e.g., `bytes=0-8388607`) instead of partNumber parameters to preserve presigned URL signatures. The first request downloads the initial part while discovering total object size from the Content-Range header.
76+
5177
### AsyncPresignedUrlExtension Interface
5278

5379
```java

0 commit comments

Comments
 (0)