AWS Security ChangesHomeSearch

AWS sagemaker documentation change

Service: sagemaker · 2026-06-28 · Documentation low

File: sagemaker/latest/dg/pipelines-troubleshooting.md

Summary

Fixed apostrophe typo in 'doesn't' and updated code examples to reflect SDK v3 changes by replacing 'estimator' with 'ModelTrainer' entity and adding new SDK v3 implementation examples

Security assessment

The changes are documentation updates without any security context. The typo fix is trivial, while the code updates demonstrate non-security related SDK usage changes. No vulnerabilities, security best practices, or security features are mentioned or implied in the modifications.

Diff

diff --git a/sagemaker/latest/dg/pipelines-troubleshooting.md b/sagemaker/latest/dg/pipelines-troubleshooting.md
index 36dc092a8..30d298bf3 100644
--- a//sagemaker/latest/dg/pipelines-troubleshooting.md
+++ b//sagemaker/latest/dg/pipelines-troubleshooting.md
@@ -13 +13 @@ When using Amazon SageMaker Pipelines, you might run into issues for various rea
-Your pipeline definition might not be formatted correctly. This can result in your execution failing or your job being inaccurate. These errors can be caught when the pipeline is created or when an execution occurs. If your definition doesn’t validate, Pipelines returns an error message identifying the character where the JSON file is malformed. To fix this problem, review the steps created using the SageMaker AI Python SDK for accuracy. 
+Your pipeline definition might not be formatted correctly. This can result in your execution failing or your job being inaccurate. These errors can be caught when the pipeline is created or when an execution occurs. If your definition doesn't validate, Pipelines returns an error message identifying the character where the JSON file is malformed. To fix this problem, review the steps created using the SageMaker AI Python SDK for accuracy. 
@@ -53 +53,52 @@ You may have issues when incorrectly implementing property files with your pipel
-You can either copy the script to the container or pass it via the `entry_point` argument (of your estimator entity) or `code` argument (of your processor entity), as demonstrated in the following code sample.
+You can either copy the script to the container or pass it via the `entry_point` argument (of your ModelTrainer entity) or `code` argument (of your processor entity), as demonstrated in the following code sample.
+
+SageMaker Python SDK v3
+    
+    
+    
+    step_process = ProcessingStep(
+        name="PreprocessAbaloneData",
+        processor=sklearn_processor,
+        inputs = [
+            ProcessingInput(
+                input_name='dataset',
+                source=...,
+                destination="/opt/ml/processing/code",
+            )
+        ],
+        outputs=[
+            ProcessingOutput(output_name="train", source="/opt/ml/processing/train", destination = processed_data_path),
+            ProcessingOutput(output_name="validation", source="/opt/ml/processing/validation", destination = processed_data_path),
+            ProcessingOutput(output_name="test", source="/opt/ml/processing/test", destination = processed_data_path),
+        ],
+        code=os.path.join(BASE_DIR, "process.py"), ## Code is passed through an argument
+        cache_config = cache_config,
+        job_arguments = ['--input', 'arg1']
+    )
+    
+    from sagemaker.core import image_uris
+    
+    sklearn_image_uri = image_uris.retrieve(
+        framework="sklearn",
+        region=region,
+        version="0.23-1",
+        instance_type=training_instance_type
+    )
+    
+    sklearn_estimator = ModelTrainer(
+        source_code=SourceCode(entry_script=os.path.join(BASE_DIR, "train.py")), ## Code is passed through source_code
+        training_image=sklearn_image_uri,
+        instance_type=training_instance_type,
+        role=role,
+        output_path=model_path, # New
+        sagemaker_session=sagemaker_session, # New
+        instance_count=1, # New
+        base_job_name=f"{base_job_prefix}/pilot-train",
+        metric_definitions=[
+            {'Name': 'train:accuracy', 'Regex': 'accuracy_train=(.*?);'},
+            {'Name': 'validation:accuracy', 'Regex': 'accuracy_validation=(.*?);'}
+        ],
+    )
+
+SageMaker Python SDK v2 (Legacy)
+