Building an MLOps Pipeline: Azure vs. AWS vs. GCP
How to Build a Modern MLOps Pipeline and Why the Architecture Remains the Same Regardless of the Cloud Provider
Over the past few years, MLOps has evolved from a set of practices into an essential component of most machine learning systems. Whereas the primary task of ML engineers used to be training models, most of their work now involves automating the model lifecycle, which includes: data preparation, training,
testing, model registration, deployment, monitoring, and retraining.
When migrating between the cloud platforms of the largest providers—Azure, AWS, and GCP—a natural question arises:
Is it necessary to completely change the architecture?
Based on my experience, the MLOps architecture itself remains virtually unchanged.
In this article, we’ll explore how the same MLOps pipeline can be easily implemented on AWS, Microsoft Azure, and Google Cloud Platform.
An example of a classic modern MLOps architecture:

And this model applies to virtually any cloud provider; the only differences are in the services offered.
Comparison of services used by Azure, AWS, and GCP:

This table clearly demonstrates that architectural patterns are the same. And every service has a counterpart at another cloud provider.
Let’s break it down step by step:
Step 1. Source code. Every pipeline starts with Git.
For example:

Step 2. Containerization. As you can see from the table, all three clouds use Docker containers.
Example Dockerfile.
FROM python:3.11
WORKDIR /app
COPY . .
RUN pip install -r requirements.txt
CMD ["python","train.py"]
After building, this image is published:
For AWS, to Amazon ECR;
For Azure, to Azure Container Registry;
And for GCP, to Artifact Registry;
Step 3. Data Storage
Object storage is used to store datasets:
Amazon S3 (AWS); Azure Blob Storage and Azure Data Lake Storage Gen2 (Microsoft Azure); Cloud Storage (GCP).
Based on my experience, to make the code as portable as possible across cloud platforms, it’s convenient to use the fsspec library, which provides a unified interface for working with various file systems. Depending on the cloud provider, the corresponding adapters are used: s3fs (Amazon S3); adlfs (Azure Blob Storage and ADLS Gen2); gcsfs (Google Cloud Storage). In this case, the code for reading data remains virtually unchanged; only the storage URI changes.
import pandas as pd
aws
df = pd.read_csv("s3://ml-data/train.csv")
azure
df = pd.read_csv("abfs://ml-data/train.csv")
google cloud
df = pd.read_csv("gs://ml-data/train.csv")
In all ML platforms, a feature store is typically used between data preparation and model training.
The classic workflow:

The Feature Store allows for centralized storage of features and their reuse across different models, ensuring consistent feature calculation logic during both training and inference. This helps avoid issues such as training-serving skew and improves model reproducibility.
Step 4. Training the Model
AWS offers SageMaker Training Jobs for this purpose.
Example of launching a training job:
from sagemaker.sklearn.estimator import SKLearn
estimator = SKLearn(
entry_point="train.py",
role=role,
instance_type="ml.m5.large",
framework_version="1.2-1"
)
estimator.fit()
Azure ML uses a Job, while GCP Vertex AI uses a Custom Training Job. Once again, we see that across all three clouds, training involves launching a container on dedicated compute resources and passing in experiment parameters and artifacts. Only the APIs and level of abstraction differ; the computational model remains the same.
Step 5. Model Registry
After successfully training the models, they must be registered. All three providers use the same concept; only the service names differ:

Step 6. Deployment
To deploy models, you can use either managed inference services—such as SageMaker Endpoints, Azure Managed Online Endpoints, and Vertex AI Endpoints—or Kubernetes clusters if you need full control over the infrastructure. On AWS, use Amazon EKS; on Azure, use AKS; and on Google, use GKE.
Deployment example:

Or using Infrastructure as Code, for example:

Step 7. CI/CD
The Classic Approach:

An example GitHub Actions:

On AWS, a similar process is implemented using CodePipeline and CodeBuild.
As we all know, CI/CD is responsible for automating the building and delivery of code; however, training models typically requires the orchestration of computational tasks.
The classic workflow:

Workflow engines are used to implement such scenarios: SageMaker Pipelines / Step Functions (AWS); Azure ML Pipelines (Azure); Vertex AI Pipelines (GCP).
When using K8s, Kubeflow Pipelines, Argo Workflows, or Apache Airflow serve a similar purpose.
Step 8. Monitoring
Modern MLOps typically includes at least four levels of monitoring: Infrastructure monitoring; Application monitoring; Data quality;
Model quality.
The classic model:

All three cloud platforms offer their own monitoring services.
In AWS, these are Amazon CloudWatch and SageMaker Model Monitor. Azure uses Azure Monitor. And GCP uses Cloud Monitoring.
Retraining is particularly worth highlighting; in my opinion, it’s one of the most interesting aspects of MLOps.
For example:

The same applies to Azure and GCP (Vertex).
It’s also worth noting that Azure ML, SageMaker, and Vertex AI can integrate with MLflow, which reduces dependence on a specific cloud service provider.
The classic workflow:

As can be seen from the information above, the architecture remains the same, but the implementation methods differ.
AWS: IAM, SageMaker Jobs, EventBridge, CloudWatch;
Azure: Entra ID, Azure ML Compute, Azure DevOps, RBAC;
GCP: Service Accounts, Vertex Pipelines, Cloud Build, Cloud IAM.
In other words, essentially the only things that are changing are IAM, Networking, the Storage SDK, managed ML services, monitoring, logging, and the cost of compute. Docker,
Python, Kubernetes, MLflow, Git, Terraform, CI/CD, models, and feature engineering remain unchanged.
So why is the architecture the same for all three providers?
All cloud providers follow the same technical principles:
containerization; Kubernetes; object storage; declarative infrastructure; CI/CD; Infrastructure as Code; automatic scaling; observability.
Consequently, switching between cloud providers typically requires replacing services rather than a complete overhaul of the architecture.
Conclusion
In my opinion, when designing MLOps systems, engineers should think in terms of architectural patterns, regardless of the specific cloud provider. Containerization, reproducible pipelines, model versioning, automated deployment, and monitoring remain constant regardless of whether AWS, Azure, or Google Cloud is used. It is precisely this approach that allows for the creation of portable ML platforms and reduces dependence on a specific cloud provider.
Useful links:
AWS
Microsoft Azure
Google Cloud Platform
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article