AWS Security ChangesHomeSearch

AWS sagemaker documentation change

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

File: sagemaker/latest/dg/use-scikit-learn-processing-container.md

Summary

Updated code examples showing how to run scikit-learn processing jobs using both SageMaker Python SDK v3 (ProcessingJob.create) and v2 (legacy). Added detailed configuration parameters for processing inputs/outputs.

Security assessment

The changes are documentation updates showing new SDK usage patterns. There are no security fixes, vulnerability disclosures, or new security features documented. The code examples focus on job configuration without addressing access controls, encryption, or security best practices.

Diff

diff --git a/sagemaker/latest/dg/use-scikit-learn-processing-container.md b/sagemaker/latest/dg/use-scikit-learn-processing-container.md
index aa07f0fe2..72ad1b448 100644
--- a//sagemaker/latest/dg/use-scikit-learn-processing-container.md
+++ b//sagemaker/latest/dg/use-scikit-learn-processing-container.md
@@ -13 +13 @@ For a sample notebook that shows how to run scikit-learn scripts using a Docker
-This notebook runs a processing job using `SKLearnProcessor` class from the the SageMaker Python SDK to run a scikit-learn script that you provide. The script preprocesses data, trains a model using a SageMaker training job, and then runs a processing job to evaluate the trained model. The processing job estimates how the model is expected to perform in production.
+This notebook runs a processing job using the SageMaker Python SDK to run a scikit-learn script that you provide. The script preprocesses data, trains a model using a SageMaker training job, and then runs a processing job to evaluate the trained model. The processing job estimates how the model is expected to perform in production.
@@ -17 +17,54 @@ To learn more about using the SageMaker Python SDK with Processing containers, s
-The following code example shows how the notebook uses `SKLearnProcessor` to run your own scikit-learn script using a Docker image provided and maintained by SageMaker AI, instead of your own Docker image.
+The following code example shows how to run a processing job using a scikit-learn Docker image provided and maintained by SageMaker AI.
+
+SageMaker Python SDK v3
+    
+    
+    
+    from sagemaker.core.resources import ProcessingJob
+    
+    processing_job = ProcessingJob.create(
+        processing_job_name="sklearn-processing",
+        role_arn=role,
+        app_specification={
+            "image_uri": "sklearn-processing-image-uri",
+            "container_entrypoint": ["python3", "/opt/ml/processing/input/code/preprocessing.py"]
+        },
+        processing_resources={
+            "cluster_config": {
+                "instance_count": 1,
+                "instance_type": "ml.m5.xlarge",
+                "volume_size_in_gb": 30
+            }
+        },
+        processing_inputs=[
+            {
+                "input_name": "code",
+                "s3_input": {
+                    "s3_uri": "s3://path/to/preprocessing.py",
+                    "local_path": "/opt/ml/processing/input/code",
+                    "s3_data_type": "S3Prefix",
+                    "s3_input_mode": "File"
+                }
+            },
+            {
+                "input_name": "input-data",
+                "s3_input": {
+                    "s3_uri": "s3://path/to/my/input-data.csv",
+                    "local_path": "/opt/ml/processing/input",
+                    "s3_data_type": "S3Prefix",
+                    "s3_input_mode": "File"
+                }
+            }
+        ],
+        processing_output_config={
+            "outputs": [
+                {"output_name": "train", "s3_output": {"s3_uri": "s3://output/train", "local_path": "/opt/ml/processing/output/train", "s3_upload_mode": "EndOfJob"}},
+                {"output_name": "validation", "s3_output": {"s3_uri": "s3://output/validation", "local_path": "/opt/ml/processing/output/validation", "s3_upload_mode": "EndOfJob"}},
+                {"output_name": "test", "s3_output": {"s3_uri": "s3://output/test", "local_path": "/opt/ml/processing/output/test", "s3_upload_mode": "EndOfJob"}}
+            ]
+        }
+    )
+    
+
+SageMaker Python SDK v2 (Legacy)
+