Skip to content

Conversation

jencymaryjoseph
Copy link
Contributor

@jencymaryjoseph jencymaryjoseph commented Aug 21, 2025

Motivation and Context

Adds downloadFileWithPresignedUrl and downloadWithPresignedUrl methods to S3TransferManager

Modifications

Added two new public API methods in S3TransferManager with consumer builder variants
Implemented presigned URL download logic in GenericS3TransferManager with multipart support and progress tracking
Enhanced PresignedUrlMultipartDownloaderSubscriber validation for small objects (size < configured part size)
Updated DefaultTransferProgressSnapshot to handle presigned URL requests
Added javadoc note that pause/resume is not supported

Testing

Integration test S3TransferManagerPresignedUrlDownloadIntegrationTest
Unit test S3TransferManagerPresignedUrlDownloadTest for core logic with mocks
Also added AsyncPresignedUrlExtensionMultipartIntegrationTest Integration tests for Multipart download for pre-signed URLs

Screenshots (if appropriate)

Screenshot 2025-08-21 at 3 39 57 PM

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Checklist

  • I have read the CONTRIBUTING document
  • Local run of mvn install succeeds
  • My code follows the code style of this project
  • My change requires a change to the Javadoc documentation
  • I have updated the Javadoc documentation accordingly
  • I have added tests to cover my changes
  • All new and existing tests passed
  • I have added a changelog entry. Adding a new entry must be accomplished by running the scripts/new-change script and following the instructions. Commit the new file created by the script in .changes/next-release with your changes.
  • My change is to implement 1.11 parity feature and I have updated LaunchChangelog

License

  • I confirm that this pull request can be released under the Apache 2 license

@jencymaryjoseph jencymaryjoseph requested a review from a team as a code owner August 21, 2025 22:40
Copy link

@@ -71,6 +73,8 @@ public static void setUpForAllIntegTests() throws Exception {
System.setProperty("aws.crt.debugnative", "true");
s3 = s3ClientBuilder().build();
s3Async = s3AsyncClientBuilder().build();
s3multiAsync = s3AsyncClientBuilder().multipartEnabled(true).build();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Redundant, s3AsyncClientBuilder() already sets multipartEnabled(true)

Comment on lines +49 to +52
// Clamp transferredBytes to not exceed totalBytes to handle race conditions
if (builder.totalBytes != null && validatedTransferredBytes > builder.totalBytes) {
validatedTransferredBytes = builder.totalBytes;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Under what scenarios would this occur?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants