Expose max_bandwidth configuration from s3transfer
See original GitHub issueThis is a feature request to expose the new max_bandwith
config option from s3transfer
. It should be fairly trivial to expose the config option in boto3.s3.transfer.TransferConfig now that s3transfer
supports it (as of 0.1.12)
Related issues + pull requests:
s3transfer
pull request for themax_bandwidth
feature: https://github.com/boto/s3transfer/pull/101awscli
pull request to expose config formax_bandwidth
: https://github.com/aws/aws-cli/pull/2997awscli
feature request issue for throttling s3 transfers: https://github.com/aws/aws-cli/issues/1090- Old
boto3
issue regarding throttling s3 transfers: https://github.com/boto/boto3/issues/343
Issue Analytics
- State:
- Created 6 years ago
- Reactions:12
- Comments:16 (3 by maintainers)
Top Results From Across the Web
Developers - Expose max_bandwidth configuration from s3transfer -
This is a feature request to expose the new max_bandwith config option from s3transfer . It should be fairly trivial to expose the...
Read more >File transfer configuration — Boto3 Docs 1.26.32 documentation
Configuration settings are stored in a boto3.s3.transfer.TransferConfig object. The object is passed to a transfer method ( upload_file , download_file , ...
Read more >Bug List - FreeBSD Bugzilla
This list is too long for Bugzilla's little mind; the Next/Prev/First/Last buttons won't appear on individual bugs. ; 260964, Ports & Packages, Individual...
Read more >s3transfer - PyPI
An Amazon S3 Transfer Manager. ... from minor version to minor version. For a basic, stable interface of s3transfer, try the interfaces exposed...
Read more >Questions for Amazon Web Services - YoYoBrain.com.
AWS: one CloudFront distribution exposes the content of ______ ... AWS: describe the AS launch configurations ... AWS: Amazon S3 Transfer Acceleration.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
As an alternative to tong-bluehill’s workaround, I’m using my own minimal
TransferConfig
class, which includes the missingmax_bandwidth
key. (Implementation in ▸ spoiler below, based ons3transfer.manager.TransferConfig
).This can then be passed to
.upload_fileobj()
or.upload_file()
as per usual.Open here for MyTransferConfig class:
It’s more LOC initially for the class, but then it’s just adding the
Config
key to the client’s upload method call and that’s it.Usage:
Result of uploading ~40MiB worth of files with a 1 MiB/s bandwidth limit:
I noticed that for low bandwidths like 100 KiB/s, the upload speeds are quite “bursty”:
I could stabilize this behaviour by changing the default value of parameter
bytes_threshold
of classBandwidthLimitedStream
inbandwidth.py
from the default256 * 1024
to a lower value. e.g.8 * 1024
. However, I didn’t investigate the side-effects of doing so, so feel free to propose a better solution. I don’t know if this for example causes any serious overheads on disk I/O or network.I also wrote a small method to apply this patch automatically:
Since the max_bandwidth is supported in boto/s3transfer but not in boto/boto3, the workaround is using s3transfer to upload with a limit. Paste my code here.