@@ -53,13 +53,13 @@ def _file_progress_cb(
5353class ClientKWArgsDict (TypedDict , total = False ):
5454 endpoint_url : str
5555 region_name : str
56- config : dict [str , str ] # For botocore config options
5756
5857
5958class S3FsSettingsDict (TypedDict ):
6059 key : str
6160 secret : str
6261 client_kwargs : ClientKWArgsDict
62+ config_kwargs : dict [str , str ] # For botocore config options
6363
6464
6565_DEFAULT_AWS_REGION : Final [str ] = "us-east-1"
@@ -69,7 +69,11 @@ def _s3fs_settings_from_s3_settings(s3_settings: S3Settings) -> S3FsSettingsDict
6969 s3fs_settings : S3FsSettingsDict = {
7070 "key" : s3_settings .S3_ACCESS_KEY ,
7171 "secret" : s3_settings .S3_SECRET_KEY ,
72- "client_kwargs" : {"config" : {"request_checksum_calculation" : "when_required" }},
72+ "client_kwargs" : {},
73+ "config_kwargs" : {
74+ "request_checksum_calculation" : "when_required" ,
75+ "signature_version" : "s3v4" ,
76+ },
7377 }
7478 if s3_settings .S3_REGION != _DEFAULT_AWS_REGION :
7579 # NOTE: see https://github.com/boto/boto3/issues/125 why this is so... (sic)
@@ -99,7 +103,7 @@ async def _copy_file(
99103 dst_storage_kwargs = dst_storage_cfg or {}
100104 with (
101105 fsspec .open (f"{ src_url } " , mode = "rb" , ** src_storage_kwargs ) as src_fp ,
102- fsspec .open (f"{ dst_url } " , "wb" , ** dst_storage_kwargs ) as dst_fp ,
106+ fsspec .open (f"{ dst_url } " , mode = "wb" , ** dst_storage_kwargs ) as dst_fp ,
103107 ):
104108 assert isinstance (src_fp , IOBase ) # nosec
105109 assert isinstance (dst_fp , IOBase ) # nosec
0 commit comments