Skip to content

Commit ffc9865

Browse files
pintaoz-awspintaoz
authored andcommitted
Use sagemaker session's s3_resource in download_folder (#5064)
Co-authored-by: pintaoz <[email protected]>
1 parent c5f9c77 commit ffc9865

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/sagemaker/utils.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -397,8 +397,7 @@ def download_folder(bucket_name, prefix, target, sagemaker_session):
397397
sagemaker_session (sagemaker.session.Session): a sagemaker session to
398398
interact with S3.
399399
"""
400-
boto_session = sagemaker_session.boto_session
401-
s3 = boto_session.resource("s3", region_name=boto_session.region_name)
400+
s3 = sagemaker_session.s3_resource
402401

403402
prefix = prefix.lstrip("/")
404403

0 commit comments

Comments
 (0)