aws / aws-sdk-java-v2

The official AWS SDK for Java - Version 2
Apache License 2.0
2.21k stars 854 forks source link

S3 Transfer Manager: bandwidth limiting for upload/download #3261

Open zoewangg opened 2 years ago

zoewangg commented 2 years ago

+1 for aws/aws-sdk-java#1103, a request for the ability to limit bandwidth for S3 uploads/downloads. See also the recently closed issue from the aws-cli repo: https://github.com/aws/aws-cli/issues/1090

This same feature would be similarly useful in the Java SDK to help avoid fees from ISPs for excessive bandwidth usage, or to prevent a single application from overwhelming a network's capacity.

Originally posted by @erikedlund in https://github.com/aws/aws-sdk-java-v2/issues/37#issuecomment-354880681

Jaeyo commented 2 years ago

+1

joernschumacher0001 commented 1 year ago

Note that you can do this when using CRT AsyncS3Client:

S3TransferManager.builder()
   .s3Client(S3AsyncClient.crtBuilder()
      .targetThroughputInGbps(0.6d)
      .build())
   .build()