AWS Security ChangesHomeSearch

AWS sagemaker documentation change

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

File: sagemaker/latest/dg/model-optimize-create-job.md

Summary

Major update adding SDK v3/v2 code examples, modifying deployment/invocation patterns, adding EULA acceptance, and updating documentation links

Security assessment

Added 'accept_eula=True' parameter to deployment examples indicates new security documentation about license compliance. While not addressing vulnerabilities, it documents a security-related requirement for model deployment. No evidence of vulnerability fixes.

Diff

diff --git a/sagemaker/latest/dg/model-optimize-create-job.md b/sagemaker/latest/dg/model-optimize-create-job.md
index d5b869b0a..9dabd2823 100644
--- a//sagemaker/latest/dg/model-optimize-create-job.md
+++ b//sagemaker/latest/dg/model-optimize-create-job.md
@@ -203 +203 @@ You can create an inference optimization job by using the SageMaker AI Python SD
-For more information about the classes and methods used in the following examples, see [APIs](https://sagemaker.readthedocs.io/en/stable/api/index.html) in the SageMaker AI Python SDK documentation.
+For more information about the classes and methods used in the following examples, see [APIs](https://sagemaker.readthedocs.io/en/stable/) in the SageMaker AI Python SDK documentation.
@@ -208,0 +209,12 @@ For more information about the classes and methods used in the following example
+SageMaker Python SDK v3
+    
+    
+        import boto3
+    from sagemaker.serve.model_builder import ModelBuilder
+    from sagemaker.serve.builder.schema_builder import SchemaBuilder
+    from sagemaker.core.helper.session_helper import Session
+    from pathlib import Path
+
+SageMaker Python SDK v2 (Legacy)
+    
+    
@@ -280,0 +293,11 @@ The `optimize()` method returns a `Model` object, which you can use to deploy yo
+SageMaker Python SDK v3
+    
+    
+        endpoint = model_builder.deploy(
+        instance_type="instance-type", 
+        accept_eula=True,
+    )
+
+SageMaker Python SDK v2 (Legacy)
+    
+    
@@ -288 +311 @@ In this example, replace ``instance-type`` with an ML instance, such as `ml.p4d.
-The `deploy()` method returns a predictor object, which you can use to send inference requests to the endpoint that hosts the model.
+The `deploy()` method returns an `Endpoint` object, which you can use to send inference requests to the endpoint that hosts the model.
@@ -316,0 +340,8 @@ The `optimize()` method returns a `Model` object, which you can use to deploy yo
+SageMaker Python SDK v3
+    
+    
+        endpoint = model_builder.deploy(accept_eula=True)
+
+SageMaker Python SDK v2 (Legacy)
+    
+    
@@ -319 +350 @@ The `optimize()` method returns a `Model` object, which you can use to deploy yo
-The `deploy()` method returns a predictor object, which you can use to send inference requests to the endpoint that hosts the model.
+The `deploy()` method returns an `Endpoint` object, which you can use to send inference requests to the endpoint that hosts the model.
@@ -372,0 +404,8 @@ The `optimize()` method returns a `Model` object, which you can use to deploy yo
+SageMaker Python SDK v3
+    
+    
+        endpoint = model_builder.deploy(accept_eula=True)
+
+SageMaker Python SDK v2 (Legacy)
+    
+    
@@ -375 +414 @@ The `optimize()` method returns a `Model` object, which you can use to deploy yo
-The `deploy()` method returns a predictor object, which you can use to send inference requests to the endpoint that hosts the model.
+The `deploy()` method returns an `Endpoint` object, which you can use to send inference requests to the endpoint that hosts the model.
@@ -403,0 +443,8 @@ In this example, set ``instance-type`` to an ML instance type with accelerated h
+SageMaker Python SDK v3
+    
+    
+        endpoint = model_builder.deploy(accept_eula=True)
+
+SageMaker Python SDK v2 (Legacy)
+    
+    
@@ -406 +453 @@ In this example, set ``instance-type`` to an ML instance type with accelerated h
-The `deploy()` method returns a predictor object, which you can use to send inference requests to the endpoint that hosts the model.
+The `deploy()` method returns an `Endpoint` object, which you can use to send inference requests to the endpoint that hosts the model.
@@ -413 +460,12 @@ The `deploy()` method returns a predictor object, which you can use to send infe
-  * To send a test inference request to your deployed model, use the `predict()` method of a predictor object. The following example passes the `sample_input` variable that was also passed to the `SchemaBuilder` class in the examples to define your model:
+  * To send a test inference request to your deployed model, use the `invoke()` method of the `Endpoint` object. The following example passes the `sample_input` variable that was also passed to the `SchemaBuilder` class in the examples to define your model:
+
+SageMaker Python SDK v3
+    
+    
+        import json
+    
+    response = endpoint.invoke(body=json.dumps(sample_input), content_type="application/json")
+    result = json.loads(response.body.read().decode('utf-8'))
+
+SageMaker Python SDK v2 (Legacy)
+    
@@ -417 +475 @@ The `deploy()` method returns a predictor object, which you can use to send infe
-The sample input has the prompt, `"What is the largest planet in the solar system?"`. The `predict()` method returns the response that the model generated, as shown by the following example:
+The sample input has the prompt, `"What is the largest planet in the solar system?"`. The `invoke()` method returns the response that the model generated, as shown by the following example:
@@ -633 +691 @@ You can't do the following:
-For more information about local mode, see [Local Mode](https://sagemaker.readthedocs.io/en/stable/overview.html#local-mode) in the SageMaker AI Python SDK documentation.
+For more information about local mode, see [Local Mode](https://sagemaker.readthedocs.io/en/stable/api/sagemaker_train.html) in the SageMaker AI Python SDK documentation.