AWS Security ChangesHomeSearch

AWS sagemaker documentation change

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

File: sagemaker/latest/dg/prebuilt-containers-extend.md

Summary

Updated SageMaker documentation to replace 'Estimator' with 'ModelTrainer' class, added new SDK v3 examples, and updated import paths.

Security assessment

Changes involve class name updates and code example modernization without any security vulnerability fixes, security feature additions, or security-related content modifications. The updates focus on SDK version changes and API usage patterns.

Diff

diff --git a/sagemaker/latest/dg/prebuilt-containers-extend.md b/sagemaker/latest/dg/prebuilt-containers-extend.md
index c8b3e8a19..1cef300b3 100644
--- a//sagemaker/latest/dg/prebuilt-containers-extend.md
+++ b//sagemaker/latest/dg/prebuilt-containers-extend.md
@@ -74 +74 @@ SageMaker AI creates an IAM role named `AmazonSageMaker-ExecutionRole-`YYYYMMDD`
-  5. In the **Permissions and encryption** section, copy **the IAM role ARN number** , and paste it into a notepad file to save it temporarily. You use this IAM role ARN number later to configure a local training estimator in the notebook instance. **The IAM role ARN number** looks like the following: `'arn:aws:iam::111122223333:role/service-role/AmazonSageMaker-ExecutionRole-20190429T110788'`
+  5. In the **Permissions and encryption** section, copy **the IAM role ARN number** , and paste it into a notepad file to save it temporarily. You use this IAM role ARN number later to configure a local training ModelTrainer in the notebook instance. **The IAM role ARN number** looks like the following: `'arn:aws:iam::111122223333:role/service-role/AmazonSageMaker-ExecutionRole-20190429T110788'`
@@ -358 +358 @@ Remember that `docker` looks for a file specifically called `Dockerfile` without
-  3. Set `role` to the role used to create your Jupyter notebook. This is used to configure your SageMaker AI Estimator.
+  3. Set `role` to the role used to create your Jupyter notebook. This is used to configure your SageMaker AI ModelTrainer.
@@ -360 +360 @@ Remember that `docker` looks for a file specifically called `Dockerfile` without
-        from sagemaker import get_execution_role
+        from sagemaker.core.helper.session_helper import get_execution_role
@@ -364 +364,21 @@ Remember that `docker` looks for a file specifically called `Dockerfile` without
-  4. Paste the following example script into the notebook code cell to configure a SageMaker AI Estimator using your extended container.
+  4. Paste the following example script into the notebook code cell to configure a SageMaker AI ModelTrainer using your extended container.
+
+SageMaker Python SDK v3
+    
+    
+        from sagemaker.train import ModelTrainer
+    from sagemaker.train.configs import Compute, SourceCode
+    from sagemaker.train.configs import InputData
+    
+    model_trainer=ModelTrainer(
+        training_image='pytorch-extended-container-test',
+        compute=Compute(instance_type='local', instance_count=1),
+        role=role,
+        hyperparameters={'epochs': '1'}
+    )
+    
+    train_data=InputData(channel_name='training', data_source='file:///tmp/pytorch-example/cifar-10-data')
+    model_trainer.train(input_data_config=[train_data])
+
+SageMaker Python SDK v2 (Legacy)
+    
@@ -441 +461,23 @@ If you want to use this training container with SageMaker Studio to use its visu
-  3. Use the `ecr_image` retrieved from the previous step to configure a SageMaker AI estimator object. The following code sample configures a SageMaker AI PyTorch estimator.
+  3. Use the `ecr_image` retrieved from the previous step to configure a SageMaker AI ModelTrainer object. The following code sample configures a SageMaker AI PyTorch ModelTrainer.
+
+SageMaker Python SDK v3
+    
+    
+        import sagemaker
+    
+    from sagemaker.core.helper.session_helper import get_execution_role
+    from sagemaker.train import ModelTrainer
+    from sagemaker.train.configs import Compute
+    
+    model_trainer=ModelTrainer(
+        training_image=ecr_image,
+        role=get_execution_role(),
+        base_job_name='pytorch-extended-container-test',
+        compute=Compute(instance_count=1, instance_type='ml.p2.xlarge')
+    )
+    
+    # start training
+    model_trainer.train()
+
+SageMaker Python SDK v2 (Legacy)
+