Skip to content

HyperparameterTuner should support writing OutputDataConfig with kms_key_id #5622

Closed

Description

@MarvinBeGood

Describe the feature you'd like:

The needed functionality is to pass a kms_key_id to the HyperparameterTuner Class for writing the OutputDataConfig encrypted into the given s3 bucket.

How would this feature be used? Please describe:
it should possible to pass a kms_key_id as arn, kms_key_alias or key_id to the HyperparameterTuner

tuner = HyperparameterTuner(
output_kms_key_id="arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"
)

Describe alternatives you've considered:
if the output_kms_key_id is not defined then the kms_key_id from the model_trainer.output_data_config.kms_key_id should be used if not none.

model_trainer = ModelTrainer(
output_data_config=OutputDataConfig(
kms_key_id="arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab",
s3_output_path="s3://s3bucket/key/"
),
)
tuner = HyperparameterTuner(
model_trainer=model_trainer ,
)

Additional context:
Sagemaker Version 3.5.0

the method _build_training_job_definition inside of HyperparameterTuner creates OutputDataConfig objects without using the kms key:

Image

Activity

  1. zhaoqizqwang commented on Apr 22, 2026

    @zhaoqizqwang
    Collaborator

    Addressed in a slightly updated PR: #5791

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions