Repository navigation
Commit 5285726
Fix s3 sse kms validate path (#5931)
* fix: use SSE-KMS in _validate_s3_path_exists when kms_key_id is set
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
* Removed duplicate
* style: black-format SSE-KMS test in test_finetune_utils
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>1 parent 4c07a98 commit 5285726
2 files changed
Lines changed: 37 additions & 5 deletions
File tree
- sagemaker-train
- src/sagemaker/train/common_utils
- tests/unit/train/common_utils
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1385 | 1385 | | |
1386 | 1386 | | |
1387 | 1387 | | |
1388 | | - | |
| 1388 | + | |
1389 | 1389 | | |
1390 | 1390 | | |
1391 | 1391 | | |
| |||
1486 | 1486 | | |
1487 | 1487 | | |
1488 | 1488 | | |
1489 | | - | |
1490 | | - | |
| 1489 | + | |
| 1490 | + | |
| 1491 | + | |
| 1492 | + | |
| 1493 | + | |
| 1494 | + | |
| 1495 | + | |
| 1496 | + | |
| 1497 | + | |
| 1498 | + | |
1491 | 1499 | | |
1492 | 1500 | | |
1493 | 1501 | | |
| |||
1535 | 1543 | | |
1536 | 1544 | | |
1537 | 1545 | | |
1538 | | - | |
| 1546 | + | |
| 1547 | + | |
| 1548 | + | |
| 1549 | + | |
| 1550 | + | |
1539 | 1551 | | |
1540 | 1552 | | |
1541 | 1553 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
674 | 674 | | |
675 | 675 | | |
676 | 676 | | |
677 | | - | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
678 | 680 | | |
679 | 681 | | |
680 | 682 | | |
| |||
879 | 881 | | |
880 | 882 | | |
881 | 883 | | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
882 | 902 | | |
883 | 903 | | |
884 | 904 | | |
| |||
0 commit comments