aws / aws/sagemaker-python-sdk

`kms_key` in `sagemaker.processing.Processor` should default to `output_kms_key`

Open
#4,874 1 comment 0 reactions 1 assignee Claimed by @pintaoz-aws View on GitHub
component: processing type: bug
Dominant language
Python
Stars
2.3k
Forks
1.3k
Avg merge
1d 22h
Merged PRs (30d)
35

Description

**Describe the bug**
The `kms_key` used to [encrypt either the user code file or local inputs when uploading to S3](https://github.com/aws/sagemaker-python-sdk/blob/master/src/sagemaker/processing.py#L367-L434) should default to `output_kms_key`.

This would align the behaviour of with `sagemaker.estimator.Estimator` where `output_kms_key` is used to [encrypt the tar'd user training code when uploading to S3](https://github.com/aws/sagemaker-python-sdk/blob/master/src/sagemaker/estimator.py#L990-L1054).

Also, since `output_kms_key` is resolved from the config it means that `kms_key` can inherit this default from the config.

**To reproduce**
A clear, step-by-step set of instructions to reproduce the bug.
The provided code need to be **complete** and **runnable**, if additional data is needed, please include them in the issue.

**Expected behavior**
The `kms_key` should default to `output_kms_key`. This can be implemented in either:

- [`sagemaker.processing.Processor._normalize_args`](https://github.com/aws/sagemaker-python-sdk/blob/master/src/sagemaker/processing.py#L284-L325)
- [`sagemaker.processing.Processor._normalize_inputs`](https://github.com/aws/sagemaker-python-sdk/blob/master/src/sagemaker/processing.py#L367-L434)

**Screenshots or logs**
If applicable, add screenshots or logs to help explain your problem.

**System information**
A description of your system. Please provide:
- **SageMaker Python SDK version**: v2.232.0
- **Framework name (eg. PyTorch) or algorithm (eg. KMeans)**: N/A
- **Framework version**: N/A
- **Python version**: 3.10
- **CPU or GPU**: CPU
- **Custom Docker image (Y/N)**: N/A

**Additional context**
Add any other context about the problem here.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.