AWS Security ChangesHomeSearch

AWS sagemaker documentation change

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

File: sagemaker/latest/dg/realtime-endpoints-deploy-models.md

Summary

Restructured documentation to differentiate between SageMaker Python SDK v3 and v2 (Legacy), added new v3 deployment examples using ModelBuilder, and updated import statements

Security assessment

Changes are documentation restructuring and SDK version differentiation. No security vulnerabilities, patches, or security-specific features are mentioned. Updates focus on deployment workflows and SDK usage without introducing security content or addressing security weaknesses.

Diff

diff --git a/sagemaker/latest/dg/realtime-endpoints-deploy-models.md b/sagemaker/latest/dg/realtime-endpoints-deploy-models.md
index 0e64f3a25..03f790961 100644
--- a//sagemaker/latest/dg/realtime-endpoints-deploy-models.md
+++ b//sagemaker/latest/dg/realtime-endpoints-deploy-models.md
@@ -335 +335 @@ The following examples prepare for the model deployment process. They import the
-SageMaker Python SDK
+SageMaker Python SDK v3
@@ -340 +340,14 @@ SageMaker Python SDK
-The following example imports modules from the SageMaker Python SDK, the SDK for Python (Boto3), and the Python Standard Library. These modules provide useful methods that help you deploy models, and they're used by the remaining examples that follow.
+The following example imports modules from the SageMaker Python SDK v3. These modules provide useful methods that help you deploy models, and they're used by the remaining examples that follow.
+    
+    
+    import boto3
+    from sagemaker.serve import ModelBuilder
+    from sagemaker.core.resources import Endpoint
+    from sagemaker.core.helper.session_helper import Session
+
+SageMaker Python SDK v2 (Legacy)
+    
+
+###### Example import statements
+
+The following example imports modules from the SageMaker Python SDK v2 (Legacy), the SDK for Python (Boto3), and the Python Standard Library. These modules provide useful methods that help you deploy models, and they're used by the remaining examples that follow.
@@ -351 +364 @@ The following example imports modules from the SageMaker Python SDK, the SDK for
-boto3 inference components
+Boto3 (Inference Components)
@@ -364 +377 @@ The following example imports modules from the SDK for Python (Boto3) and the Py
-boto3 models (without inference components)
+Boto3 (Model-based)
@@ -401 +414,13 @@ There are multiple ways that you can deploy models with the SageMaker Python SDK
-SageMaker Python SDK
+SageMaker Python SDK v3
+    
+
+Using the SageMaker Python SDK v3, you build and deploy your model with `ModelBuilder`. You provide model artifacts or inference code, and `ModelBuilder` automatically captures your dependencies, infers the needed serialization and deserialization functions, and packages your dependencies to create your model. To deploy a model, you complete the following steps:
+
+  1. Create a `ModelBuilder` object with your model artifacts, role, and instance type.
+
+  2. Call `deploy()` to deploy the model to an endpoint.
+
+
+
+
+SageMaker Python SDK v2 (Legacy)
@@ -426 +451 @@ The examples that follow describe both methods to create your model and deploy y
-boto3 inference components
+Boto3 (Inference Components)
@@ -448 +473 @@ You also allocate endpoint resources to the model. By creating the inference com
-boto3 models (without inference components)
+Boto3 (Model-based)
@@ -468 +493,16 @@ The following examples configure the resources that you require to deploy a mode
-SageMaker Python SDK
+SageMaker Python SDK v3
+    
+
+The following example configures a `ModelBuilder` with your model artifacts. `ModelBuilder` provides a unified interface for model packaging and deployment.
+    
+    
+    from sagemaker.serve import ModelBuilder
+    
+    model_builder = ModelBuilder(
+        image_uri="image-uri",
+        s3_model_data_url=model_url,
+        role_arn="arn:aws:iam::111122223333:role/service-role/role-name",
+        instance_type="ml.p4d.24xlarge",
+    )
+
+SageMaker Python SDK v2 (Legacy)
@@ -517 +557 @@ The following example assigns endpoint resources to a model with a `ResourceRequ
-boto3 inference components
+Boto3 (Inference Components)
@@ -545 +585 @@ The following example configures an endpoint with the `create_endpoint_config` m
-boto3 models (without inference components)
+Boto3 (Model-based)
@@ -608 +648,20 @@ The following examples deploy a model to an endpoint.
-SageMaker Python SDK
+SageMaker Python SDK v3
+    
+
+The following example deploys the model to a real-time, HTTPS endpoint using the `deploy` method of `ModelBuilder`.
+    
+    
+    endpoint = model_builder.deploy(
+        endpoint_name="endpoint-name",
+        instance_type="ml.p4d.24xlarge",
+        initial_instance_count=1,
+    )
+    
+    # Invoke the endpoint
+    response = endpoint.invoke(
+        body=test_payload,
+        content_type="application/json"
+    )
+    print(response)
+
+SageMaker Python SDK v2 (Legacy)
@@ -641 +700 @@ The following code sample demonstrates another case where you deploy a model to
-boto3 inference components
+Boto3 (Inference Components)
@@ -674 +733 @@ After you've created an endpoint, you can deploy one or models to it by creating
-boto3 models (without inference components)
+Boto3 (Model-based)