In this section, we will register the trained model to the SageMaker Model Registry for version management, metadata tracking, and future deployment. This is an important step to make your ML pipeline repeatable, version-controlled, and deployable.
Register the trained model from S3 output to the SageMaker Model Registry.
Attach metadata (version, data information, hyperparameters, metrics).
Manage model versions and approval status (Approved/Pending/Rejected).
SageMaker Model Registry is a ML model lifecycle management service that allows you to:
Store and manage model versions over time.
Attach model information such as metrics, hyperparameters, training data.
Control the model approval process before deployment.
Integrate directly with SageMaker Endpoint to deploy production models.
📊 Architecture after adding Model Registry:

Fill in the information:
ml-pipeline-model-group

Now we will create a Model Package from the saved model after training (model.tar.gz) in S3.
Model package name: ml-pipeline-model-v1
Model location (S3): s3://ml-pipeline-bucket/model/model.tar.gz
Inference image URI:
If using built-in XGBoost: select the available container from SageMaker.
If custom: enter your ECR container image.
IAM Role: SageMakerExecutionRole (has access to S3 and SageMaker).
Approval status: Pending manual approval (or Approved if ready to deploy).

You can attach important information to help the ML/DevOps team understand the model:
v1.0XGBoost0.912Lambda Preprocessing Pipeline📌 This is useful when you have multiple models and need to choose the best one to deploy.
Every time you create a new Model Package, it becomes a version in the group:
| Version | Model Name | Accuracy | Status | Approval |
|---|---|---|---|---|
| 1 | ml-pipeline-model-v1 | 0.912 | Completed | Approved ✅ |
| 2 | ml-pipeline-model-v2 | 0.927 | Completed | Pending 🕐 |
📈 You can update the model status from Pending → Approved once the review is complete.
If you want to automate, you can register the model using CLI:
aws sagemaker create-model-package \
--model-package-group-name ml-pipeline-model-group \
--model-package-description "ML pipeline v1 model" \
--model-approval-status Approved \
--inference-specification '{"Containers": [{"Image": "<IMAGE_URI>", "ModelDataUrl": "s3://ml-pipeline-bucket/model/model.tar.gz"}], "SupportedContentTypes": ["text/csv"], "SupportedResponseMIMETypes": ["text/csv"]}'
When training a new model, simply create a new Model Package in the same Model Package Group.
This helps track model history and makes it easy to rollback if the new model fails.
You have successfully registered your trained model in the SageMaker Model Registry, managing version and approval status.
This is an important step to keep your ML pipeline organized and make it easy to deploy models into production.