AWS Security ChangesHomeSearch

AWS sagemaker documentation change

Service: sagemaker · 2026-07-01 · Documentation low

File: sagemaker/latest/dg/ex1-model-deployment.md

Summary

Removed legacy SageMaker Python SDK v2 examples and references while cleaning up section headers and empty lines. Retained SDK v3 content.

Security assessment

The changes involve removing outdated code examples and section headers without introducing new security content or addressing vulnerabilities. No security advisories, vulnerability fixes, or security feature enhancements are mentioned in the diff.

Diff

diff --git a/sagemaker/latest/dg/ex1-model-deployment.md b/sagemaker/latest/dg/ex1-model-deployment.md
index f3a8829e4..f8893a65d 100644
--- a//sagemaker/latest/dg/ex1-model-deployment.md
+++ b//sagemaker/latest/dg/ex1-model-deployment.md
@@ -28,3 +27,0 @@ To host a model through Amazon EC2 using Amazon SageMaker AI, deploy the model t
-SageMaker Python SDK v3
-    
-
@@ -61,28 +57,0 @@ The `build()` method creates a SageMaker AI Model resource, and `deploy()` creat
-SageMaker Python SDK v2 (Legacy)
-    
-
-When you call the `deploy` method, you must specify the number and type of EC2 ML instances that you want to use for hosting an endpoint.
-    
-    
-    import sagemaker
-    from sagemaker.serializers import CSVSerializer
-    xgb_predictor=xgb_model.deploy(
-        initial_instance_count=1,
-        instance_type='ml.t2.medium',
-        serializer=CSVSerializer()
-    )
-
-  * `initial_instance_count` (int) – The number of instances to deploy the model.
-
-  * `instance_type` (str) – The type of instances that you want to operate your deployed model.
-
-  * `serializer` (int) – Serialize input data of various formats (a NumPy array, list, file, or buffer) to a CSV-formatted string. We use this because the XGBoost algorithm accepts input files in CSV format.
-
-
-
-
-The `deploy` method creates a deployable model, configures the SageMaker AI hosting services endpoint, and launches the endpoint to host the model. For more information, see the [SageMaker AI generic Estimator's deploy class method](https://sagemaker.readthedocs.io/en/stable/estimators.html#sagemaker.estimator.Estimator.deploy) in the [Amazon SageMaker Python SDK](https://sagemaker.readthedocs.io/en/stable). To retrieve the name of endpoint that's generated by the `deploy` method, run the following code:
-    
-    
-    xgb_predictor.endpoint_name
-
@@ -97,3 +65,0 @@ To learn more about compiling and optimizing your model for deployment to Amazon
-SageMaker Python SDK v3
-    
-
@@ -114,15 +79,0 @@ After you deploy the model to an endpoint, you can invoke it from any other note
-SageMaker Python SDK v2 (Legacy)
-    
-
-After you deploy the model to an endpoint, you can set up a new SageMaker AI predictor by pairing the endpoint and continuously make real-time predictions in any other notebooks. The following example code shows how to use the SageMaker AI Predictor class to set up a new predictor object using the same endpoint. Re-use the endpoint name that you used for the `xgb_predictor`.
-    
-    
-    import sagemaker
-    xgb_predictor_reuse=sagemaker.predictor.Predictor(
-        endpoint_name="sagemaker-xgboost-YYYY-MM-DD-HH-MM-SS-SSS",
-        sagemaker_session=sagemaker.Session(),
-        serializer=sagemaker.serializers.CSVSerializer()
-    )
-
-The `xgb_predictor_reuse` Predictor behaves exactly the same as the original `xgb_predictor`. For more information, see the [SageMaker AI Predictor](https://sagemaker.readthedocs.io/en/stable/predictors.html#sagemaker.predictor.RealTimePredictor) class in the [Amazon SageMaker Python SDK](https://sagemaker.readthedocs.io/en/stable).
-
@@ -152,3 +102,0 @@ Instead of hosting an endpoint in production, you can run a one-time batch infer
-SageMaker Python SDK v3
-    
-    
@@ -185,17 +132,0 @@ SageMaker Python SDK v3
-SageMaker Python SDK v2 (Legacy)
-    
-    
-        transformer = xgb_model.transformer(
-        instance_count=1, 
-        instance_type='ml.m4.xlarge', 
-        output_path=batch_output
-    )
-    
-    transformer.transform(
-        data=batch_input, 
-        data_type='S3Prefix',
-        content_type='text/csv', 
-        split_type='Line'
-    )
-    transformer.wait()
-