Closed holmuk closed 1 year ago
S3TransferConfig as assumed in aioboto3.s3.inject doesn't match the definition from boto3.
S3TransferConfig
aioboto3.s3.inject
boto3
For example,
max_concurrency = 10 if Config is None else Config.max_concurrency
fails because there is no such field in S3TransferConfig , although it has max_request_concurrency
max_request_concurrency
For instance, I want to upload a file-object using a custom config:
chunk_size = 10 * 1024 * 1024 config = S3TransferConfig( multipart_threshold=chunk_size, multipart_chunksize=chunk_size, max_in_memory_upload_chunks=2, max_io_queue_size=2, max_request_concurrency=1 ) with get_client() as s3: await s3.upload_fileobj(fileobj, bucket_name, dst_key, Config=config)
The code fails with AttributeError. As a workaround, I can set the fields manually, but it's not evident that I have to do so to get things working.
AttributeError
config.max_concurrency = 1 config.max_io_queue = 2
Makes sense, not kept on top of the S3 transfer config options so it seems they've changed since I last looked at them :smile: will have a look at fixing it.
Should be fixed in v11.0.0, reopen if not.
Description
S3TransferConfig
as assumed inaioboto3.s3.inject
doesn't match the definition fromboto3
.For example,
fails because there is no such field in
S3TransferConfig
, although it hasmax_request_concurrency
What I Did
For instance, I want to upload a file-object using a custom config:
The code fails with
AttributeError
. As a workaround, I can set the fields manually, but it's not evident that I have to do so to get things working.