Skip to content

Commit 9f81006

Browse files
authored
fix: use valid encryption key arg for S3 downloads (#1414)
1 parent 09d7a76 commit 9f81006

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/sagemaker/s3.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ def download(s3_uri, local_path, kms_key=None, session=None):
110110
sagemaker_session = session or Session()
111111
bucket, key_prefix = parse_s3_url(url=s3_uri)
112112
if kms_key is not None:
113-
extra_args = {"SSEKMSKeyId": kms_key}
113+
extra_args = {"SSECustomerKey": kms_key}
114114
else:
115115
extra_args = None
116116

tests/unit/test_s3.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,5 +91,5 @@ def test_download_with_kms_key(sagemaker_session):
9191
path="/path/for/download/",
9292
bucket=BUCKET_NAME,
9393
key_prefix=os.path.join(CURRENT_JOB_NAME, SOURCE_NAME),
94-
extra_args={"SSEKMSKeyId": KMS_KEY},
94+
extra_args={"SSECustomerKey": KMS_KEY},
9595
)

0 commit comments

Comments
 (0)