Skip to content

fix: Pass KMS value to create processing job in S3 bucket with restrictions #3366

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/sagemaker/processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -1566,6 +1566,7 @@ def _create_estimator(
sagemaker_session=self.sagemaker_session,
debugger_hook_config=False,
disable_profiler=True,
output_kms_key=self.output_kms_key,
)

def get_run_args(
Expand Down Expand Up @@ -1804,7 +1805,7 @@ def _pack_and_upload_code(
raise RuntimeError("S3 source_dir file must be named `sourcedir.tar.gz.`")

script = estimator.uploaded_code.script_name
s3_runproc_sh = self._create_and_upload_runproc(script, kms_key, entrypoint_s3_uri)
s3_runproc_sh = self._create_and_upload_runproc(script, self.output_kms_key, entrypoint_s3_uri)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@raj-oli thanks for the contribution, but what if a custom kms key is set by the method argument kms_key, I think we need to set kms_key = self.output_kms_key if kms_key=None

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mufaddal-rohawala. Thanks for the heads up. You're right !!.
I'll close this PR as you've already merged the fix. Thank you


return s3_runproc_sh, inputs, job_name

Expand Down