Note
All classes documented below are considered public and thus will not be
exposed to breaking changes. If a class from the boto3.s3.transfer
module is not documented below, it is considered internal and users
should be very cautious in directly using them because breaking changes may
be introduced from version to version of the library. It is recommended to
use the variants of the transfer functions injected into the S3 client
instead.
See also
S3.Client.upload_file()
S3.Client.upload_fileobj()
S3.Client.download_file()
S3.Client.download_fileobj()
boto3.s3.transfer.
TransferConfig
(multipart_threshold=8388608, max_concurrency=10, multipart_chunksize=8388608, num_download_attempts=5, max_io_queue=100, io_chunksize=262144, use_threads=True, max_bandwidth=None)[source]¶Configuration object for managed S3 transfers
use_threads
is
set to False
, the value provided is ignored as the transfer
will only ever use the main thread.io_chunksize
.read
is called on the
downloaded stream as well.ALIAS
= {'max_concurrency': 'max_request_concurrency', 'max_io_queue': 'max_io_queue_size'}¶boto3.s3.transfer.
S3Transfer
(client=None, config=None, osutil=None, manager=None)[source]¶ALLOWED_DOWNLOAD_ARGS
= ['ChecksumMode', 'VersionId', 'SSECustomerAlgorithm', 'SSECustomerKey', 'SSECustomerKeyMD5', 'RequestPayer', 'ExpectedBucketOwner']¶ALLOWED_UPLOAD_ARGS
= ['ACL', 'CacheControl', 'ChecksumAlgorithm', 'ContentDisposition', 'ContentEncoding', 'ContentLanguage', 'ContentType', 'ExpectedBucketOwner', 'Expires', 'GrantFullControl', 'GrantRead', 'GrantReadACP', 'GrantWriteACP', 'Metadata', 'ObjectLockLegalHoldStatus', 'ObjectLockMode', 'ObjectLockRetainUntilDate', 'RequestPayer', 'ServerSideEncryption', 'StorageClass', 'SSECustomerAlgorithm', 'SSECustomerKey', 'SSECustomerKeyMD5', 'SSEKMSKeyId', 'SSEKMSEncryptionContext', 'Tagging', 'WebsiteRedirectLocation']¶download_file
(bucket, key, filename, extra_args=None, callback=None)[source]¶Download an S3 object to a file.
Variants have also been injected into S3 client, Bucket and Object. You don't have to use S3Transfer.download_file() directly.
See also
S3.Client.download_file()
S3.Client.download_fileobj()