- Create an endpoint configuration and endpoint via the Boto3 SDK.
- Create a model and endpoint using the SageMaker Python SDK (single-flow approach).
- Compare invocation methods: Boto3
invoke_endpointvs SageMaker SDKPredictor. - Test and clean up endpoints to avoid incurring charges.

Predictor for the SDK example and Boto3’s invoke_endpoint for the Boto3 example so you can see the differences in interaction style.
Getting started in SageMaker Studio
All commands in this demo are executed from a JupyterLab notebook inside SageMaker Studio.
Here is the JupyterLab Launcher in SageMaker Studio where the notebooks live:

- Initialize the notebook: import libraries, create a SageMaker session, obtain the execution role, and set an S3 bucket/prefix for model artifacts
- Upload the model artifact to S3 (if applicable) and determine the container image URI for hosting
- If your model was produced by a training job, you can skip the upload and reference the training job’s output S3 URI directly.
- For models that were saved locally in the notebook environment, upload to S3 and then choose the appropriate container image (this demo uses Linear Learner).
If your model artifact is already available from a training job’s output, you can skip the upload step and reference the existing training output S3 path.
- Create a SageMaker model object (register the model in SageMaker)
Model constructs a model resource in SageMaker that maps the container image to the model artifact and IAM role. Only when you call model.create() is the model created in SageMaker.
house-prices-inference-demo exists with the matching model artifact and container image.
Example resource values you may see (for reference):
- Create an endpoint configuration using Boto3
- Create the SageMaker endpoint that references the endpoint configuration

- Boto3 requires a two-step process: create the endpoint configuration, then create the endpoint that references it.
- The SageMaker Python SDK provides higher-level constructs to create model and endpoint resources in fewer lines of code and supports using
Predictorfor inference.
SageMaker Studio and the AWS Management Console show related but slightly different views. Studio lists endpoints under Deployments → Endpoints, but it does not display endpoint configuration objects separately. To inspect endpoint configurations directly, use the Management Console (Inference → Endpoint configurations) or enumerate them via SDK calls.
InService or to report failures. This is useful for automation in notebooks or CI pipelines.
- For the Boto3-based endpoint, call the runtime
invoke_endpointAPI to send binary/payload requests and receive the response. - For the SDK-based endpoint (later in the notebook), use the
Predictorclass which wraps serialization/deserialization and runtime invocation in a convenient interface.
Links and references
- SageMaker SDK documentation: https://sagemaker.readthedocs.io/
- Boto3 SageMaker client: https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/sagemaker.html
- SageMaker Predictor: https://sagemaker.readthedocs.io/en/stable/predictors.html
- Amazon S3 basics: https://learn.kodekloud.com/user/courses/amazon-simple-storage-service-amazon-s3
- Run the SDK-based example that builds the
Modeland endpoint using higher-level APIs and then usesPredictorto make requests. - Compare the two invocation styles (Boto3 vs
Predictor) for serialization, error handling, and convenience. - Delete the endpoint, endpoint configuration, and model resources to avoid ongoing charges.