Skip to content

Fix s3 sse kms validate path#5931

Open
kartik2112 wants to merge 2 commits into
aws:masterfrom
kartik2112:fix-s3-sse-kms-validate-path
Open

Fix s3 sse kms validate path#5931
kartik2112 wants to merge 2 commits into
aws:masterfrom
kartik2112:fix-s3-sse-kms-validate-path

Conversation

@kartik2112
Copy link
Copy Markdown

@kartik2112 kartik2112 commented Jun 5, 2026

When a target S3 bucket enforces SSE-KMS, _validate_s3_path_exists previously failed with access denied because its put_object call to create a missing prefix did not specify encryption. Thread the SFTTrainer kms_key_id (already available in _create_output_config) into _validate_s3_path_exists and include ServerSideEncryption=aws:kms and SSEKMSKeyId when it is provided.

Fixes #5930

Issue #, if available:

Description of changes:
Adds SSEKMS Key support to SFT Trainer for validate_s3_path step and create missing prefixes

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

When a target S3 bucket enforces SSE-KMS, _validate_s3_path_exists previously failed with access denied because its put_object call to create a missing prefix did not specify encryption. Thread the SFTTrainer kms_key_id (already available in _create_output_config) into _validate_s3_path_exists and include ServerSideEncryption=aws:kms and SSEKMSKeyId when it is provided.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Server Side Encryption using KMS Key failing for validate_s3_path_exists

1 participant