From f23cc3c677d1fb7169e54f8b17bd523f2f8ebcf7 Mon Sep 17 00:00:00 2001 From: dzikafoczka Date: Sat, 21 Dec 2024 22:43:48 +0100 Subject: [PATCH] test --- ec2.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ec2.py b/ec2.py index 7bc1da3..00fac04 100644 --- a/ec2.py +++ b/ec2.py @@ -1,5 +1,6 @@ import boto3 from boto3.s3.transfer import S3Transfer +from boto3.s3.transfer import TransferConfig import base64 import os @@ -271,7 +272,8 @@ def create_s3_bucket(s3_client, bucket_name): return bucket_name def upload_files_to_s3(s3_client, bucket_name, folder_path): - transfer = S3Transfer(s3_client) + config = TransferConfig(multipart_chunksize=50 * 1024 * 1024) + transfer = S3Transfer(s3_client, config) for root, dirs, files in os.walk(folder_path): for file in files: file_path = os.path.join(root, file)