Skip to content

Update S3 Pre-signed URL design: Use String range parameter #6248

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions docs/design/core/presignedURL-Get/DecisionLog.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

# S3 Pre-signed URL GET - Decision Log

## Review Meeting: 06/17/2024
## Review Meeting: 06/17/2025
**Attendees**: Alban, John, Zoe, Dongie, Bole, Ran, Saranya

### Closed Decisions
Expand All @@ -20,7 +20,7 @@

3. What should we name the Helper API? Options include PresignedURLManager or PresignedUrlExtension. Will be addressed in the Surface API Review.

## Review Meeting: 06/23/2024
## Review Meeting: 06/23/2025
**Attendees**: John, Zoe, Dongie, Bole, Ran, Saranya, Alex, David

### Decisions Addressed
Expand All @@ -30,3 +30,9 @@
2. Replace IS_DISCOVERED_ENDPOINT execution attribute with a more semantically appropriate solution. Decided to introduce new SKIP_ENDPOINT_RESOLUTION execution attribute specifically for presigned URL scenarios where endpoint resolution should be bypassed, as IS_DISCOVERED_ENDPOINT is tied to deprecated endpoint discovery feature.

3. Use separate rangeStart/rangeEnd fields vs single range string parameter. Decided to use separate rangeStart and rangeEnd Long fields for better user experience, as start/end is more intuitive than string parsing.

## Decision Poll Meeting: 06/30/2025
**Attendees**: John, Zoe, Dongie, Bole, Ran, Saranya, Alex

### Decision Addressed
Decided to use String range field for Request object to support all RFC 7233 formats including suffix ranges (bytes=-100) and future multi-range support, since S3 currently doesn't support multiple ranges but may in the future without requiring SDK changes.
12 changes: 5 additions & 7 deletions docs/design/core/presignedURL-Get/Design.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ PresignedUrlManager presignManager = s3Client.presignedManager();
// Create presigned URL request
PresignedUrlGetObjectRequest request = PresignedUrlGetObjectRequest.builder()
.presignedUrl(presignedUrl)
.rangeStart(0L)
.rangeEnd(1024L)
.range("range=0-1024")
.build();

// Async usage
Expand Down Expand Up @@ -128,12 +127,11 @@ public final class PresignedUrlGetObjectRequest
implements ToCopyableBuilder<PresignedUrlGetObjectRequest.Builder, PresignedUrlGetObjectRequest> {

private final String presignedUrl;
private final Long rangeStart;
private final Long rangeEnd;
private final String range;

// Standard getters: presignedUrl(), rangeStart(), rangeEnd()
// Standard getters: presignedUrl(), range()
// Standard builder methods: builder(), toBuilder()
// Standard Builder class with presignedUrl(), rangeStart(), rangeEnd() setter methods
// Standard Builder class with presignedUrl(), range() setter methods
}
```

Expand All @@ -159,7 +157,7 @@ Three approaches were considered:

### Why doesn't PresignedUrlGetObjectRequest extend S3Request?

While extending S3Request would provide access to RequestOverrideConfiguration, many of these configurations (like credentials provider, signers) are not supported with presigned URL execution. Instead, we use a standalone request with only essential parameters (presignedUrl, rangeStart, rangeEnd). Internally, this gets wrapped in an encapsulated class that extends S3Request for use with ClientHandler.
While extending S3Request would provide access to RequestOverrideConfiguration, many of these configurations (like credentials provider, signers) are not supported with presigned URL execution. Instead, we use a standalone request with only essential parameters (presignedUrl, range). Internally, this gets wrapped in an encapsulated class that extends S3Request for use with ClientHandler.


## References
Expand Down