Cloud Service Comparison: AI/ML Services¶
Quick Reference¶
This guide provides a comprehensive comparison of AI/ML services across AWS, Google Cloud Platform (GCP), and Microsoft Azure. Use this to understand equivalent services when building machine learning applications, training models, or deploying AI solutions across cloud providers.
ML Platforms (End-to-End ML Workflow)¶
| Feature | AWS SageMaker | GCP Vertex AI | Azure Machine Learning |
|---|---|---|---|
| Service Name | Amazon SageMaker | Vertex AI | Azure Machine Learning |
| Launch Year | 2017 | 2021 (unified platform) | 2014 (rebranded 2019) |
| IDE/Notebooks | SageMaker Studio, Notebook Instances | Vertex AI Workbench, Colab Enterprise | Azure ML Studio, Compute Instances |
| Jupyter Integration | JupyterLab in Studio | JupyterLab, Managed notebooks | JupyterLab, VS Code integration |
| Data Labeling | SageMaker Ground Truth | Vertex AI Data Labeling | Azure ML Data Labeling |
| Feature Store | SageMaker Feature Store | Vertex AI Feature Store | Azure ML Feature Store (preview) |
| Training | Built-in algorithms, custom containers | Pre-built containers, custom training | Designer, AutoML, custom scripts |
| Distributed Training | Data parallelism, model parallelism | Multi-node, multi-GPU | Distributed training with Horovod, DeepSpeed |
| Hyperparameter Tuning | Automatic Model Tuning | Vertex AI Vizier | HyperDrive |
| Experiment Tracking | SageMaker Experiments | Vertex AI Experiments | Azure ML Experiments, MLflow integration |
| Model Registry | SageMaker Model Registry | Vertex AI Model Registry | Azure ML Model Registry |
| Model Monitoring | Model Monitor | Vertex AI Model Monitoring | Model monitoring, data drift detection |
| Deployment | Real-time endpoints, batch, serverless | Prediction endpoints, batch | Real-time endpoints, batch endpoints |
| A/B Testing | Multi-model endpoints | Traffic splitting | Blue-green deployments |
| Edge Deployment | SageMaker Edge Manager, Neo | Edge TPU, TensorFlow Lite | Azure IoT Edge, ONNX Runtime |
| MLOps | SageMaker Pipelines, Projects | Vertex AI Pipelines | Azure ML Pipelines |
| Pipeline Orchestration | Step Functions, Pipelines | Kubeflow Pipelines, Vertex Pipelines | Azure ML Pipelines, Data Factory |
| Supported Frameworks | TensorFlow, PyTorch, scikit-learn, XGBoost, MXNet, Hugging Face | TensorFlow, PyTorch, scikit-learn, XGBoost | TensorFlow, PyTorch, scikit-learn, ONNX |
| Pricing Model | Pay per instance hour + storage | Pay per compute hour + predictions | Pay per compute hour + deployments |
Documentation: - π AWS SageMaker Documentation - Complete SageMaker guide - π GCP Vertex AI Documentation - Complete Vertex AI guide - π Azure Machine Learning Documentation - Complete Azure ML guide - π SageMaker Studio Documentation - IDE environment - π Vertex AI Workbench Documentation - Jupyter notebooks - π Azure ML Studio Documentation - ML workspace
AutoML (Automated Machine Learning)¶
| Feature | AWS | GCP | Azure |
|---|---|---|---|
| Service Name | SageMaker Autopilot | Vertex AI AutoML | Azure Automated ML |
| Tabular Data | Yes | Yes (Tables) | Yes |
| Image Classification | Canvas | Yes (Vision) | Yes |
| Object Detection | Canvas | Yes (Vision) | Yes |
| Text Classification | Canvas | Yes (Natural Language) | Yes |
| Sentiment Analysis | Canvas | Yes (Natural Language) | Yes |
| Forecasting | Canvas | Yes (Forecasting) | Yes |
| Video Intelligence | No native AutoML | Yes (Video) | Video Indexer (separate) |
| Code Generation | Automatic feature engineering | AutoML code export | Python SDK generated code |
| Model Explainability | Yes | Yes (Explainable AI) | Yes |
| No-Code Interface | SageMaker Canvas | Vertex AI UI | Azure ML Studio |
| Custom Training Time | Configurable | Configurable budget | Configurable |
| Output Format | Model artifact, notebook | Model endpoint, container | ONNX, pickle, Docker |
| Integration | SageMaker ecosystem | Vertex AI ecosystem | Azure ML ecosystem |
Documentation: - π SageMaker Autopilot Documentation - AutoML for tabular data - π SageMaker Canvas Documentation - No-code ML - π Vertex AI AutoML Documentation - Automated training - π Azure Automated ML Documentation - AutoML overview
Computer Vision Services¶
| Feature | AWS | GCP | Azure |
|---|---|---|---|
| Image Analysis | Rekognition | Vision AI | Computer Vision |
| Object Detection | DetectLabels | Object Localization | Detect objects |
| Face Detection | DetectFaces | Face Detection | Face API |
| Face Recognition | CompareFaces, SearchFaces | Face Recognition | Face verification, identification |
| Celebrity Recognition | RecognizeCelebrities | Celebrity Recognition | N/A |
| Text in Images (OCR) | Textract, Rekognition | Vision OCR | Computer Vision OCR, Form Recognizer |
| Content Moderation | DetectModerationLabels | SafeSearch Detection | Content Moderator |
| Custom Models | Custom Labels | AutoML Vision, Vertex AI | Custom Vision |
| Image Labeling | Ground Truth | Data Labeling Service | Azure ML Data Labeling |
| Video Analysis | Rekognition Video | Video Intelligence API | Video Indexer |
| Video Content Moderation | Yes | Yes | Yes |
| Streaming Video | Kinesis Video Streams + Rekognition | N/A | Azure Media Services |
| Landmark Detection | Yes | Yes | Yes |
| Logo Detection | Yes | Yes | Yes |
| Explicit Content | Yes | Yes | Yes |
| Pricing Model | Per image/video minute | Per image, video unit | Per transaction |
Documentation: - π AWS Rekognition Documentation - Image and video analysis - π AWS Textract Documentation - Document text extraction - π GCP Vision AI Documentation - Image analysis - π GCP Video Intelligence Documentation - Video analysis - π Azure Computer Vision Documentation - Image analysis - π Azure Face API Documentation - Face detection and recognition - π Azure Custom Vision Documentation - Custom models
Natural Language Processing (NLP) & Text Analytics¶
| Feature | AWS | GCP | Azure |
|---|---|---|---|
| Service Name | Comprehend | Natural Language AI | Text Analytics, Language Service |
| Sentiment Analysis | DetectSentiment | analyzeSentiment | Sentiment Analysis |
| Entity Recognition | DetectEntities | analyzeEntities | Named Entity Recognition (NER) |
| Key Phrase Extraction | DetectKeyPhrases | N/A | Key Phrase Extraction |
| Language Detection | DetectDominantLanguage | N/A | Language Detection |
| Syntax Analysis | DetectSyntax | analyzeSyntax | N/A |
| Custom Classification | Custom Classification | AutoML Natural Language | Custom Text Classification |
| Custom Entity Recognition | Custom Entity Recognition | AutoML Entity Extraction | Custom NER |
| PII Detection | DetectPiiEntities | DLP API (separate) | PII Detection |
| Medical NLP | Comprehend Medical | Healthcare Natural Language API | Text Analytics for Health |
| Document Classification | Yes | Yes | Yes |
| Topic Modeling | Topic modeling | N/A | N/A |
| Languages Supported | 100+ | 100+ | 100+ |
Documentation: - π AWS Comprehend Documentation - NLP service - π AWS Comprehend Medical Documentation - Healthcare NLP - π GCP Natural Language AI Documentation - Text analysis - π Azure Text Analytics Documentation - Language understanding
Speech Services¶
| Feature | AWS | GCP | Azure |
|---|---|---|---|
| Speech-to-Text | Transcribe | Speech-to-Text | Speech to Text |
| Text-to-Speech | Polly | Text-to-Speech | Text to Speech |
| Real-time Transcription | Yes (streaming) | Yes (streaming) | Yes (streaming) |
| Batch Transcription | Yes | Yes | Yes |
| Custom Vocabulary | Yes | Yes | Yes |
| Speaker Diarization | Yes | Yes | Yes |
| Custom Voice | Polly Brand Voice | Custom voices | Custom Neural Voice |
| Neural Voices | Neural TTS | WaveNet, Neural2 | Neural TTS |
| SSML Support | Yes | Yes | Yes |
| Languages | 30+ | 125+ | 100+ |
| Medical Transcription | Transcribe Medical | Healthcare Speech-to-Text | N/A |
| Call Analytics | Transcribe Call Analytics | N/A | N/A |
| Voice Cloning | N/A | N/A | Custom Neural Voice |
| Pronunciation Assessment | N/A | N/A | Pronunciation Assessment |
Documentation: - π AWS Transcribe Documentation - Speech-to-text - π AWS Polly Documentation - Text-to-speech - π GCP Speech-to-Text Documentation - Speech recognition - π GCP Text-to-Speech Documentation - Voice synthesis - π Azure Speech Service Documentation - Unified speech service
Translation Services¶
| Feature | AWS | GCP | Azure |
|---|---|---|---|
| Service Name | Translate | Cloud Translation API | Translator |
| Text Translation | Yes | Yes | Yes |
| Real-time Translation | Yes | Yes | Yes |
| Batch Translation | Yes | Yes | Yes (Document Translation) |
| Custom Translation | Custom Terminology | AutoML Translation | Custom Translator |
| Document Translation | Yes | Yes | Yes |
| Language Detection | Yes | Yes | Yes |
| Languages Supported | 75+ | 100+ | 100+ |
| Formality Control | Yes | N/A | N/A |
| Profanity Masking | Yes | N/A | Yes |
| Pricing Model | Per character | Per character | Per character |
Documentation: - π AWS Translate Documentation - Neural machine translation - π GCP Translation API Documentation - Text translation - π Azure Translator Documentation - Translation service
Generative AI & Large Language Models¶
| Feature | AWS | GCP | Azure |
|---|---|---|---|
| Service Name | Amazon Bedrock | Vertex AI (Model Garden, Generative AI) | Azure OpenAI Service |
| Foundation Models | Anthropic Claude, Meta Llama, Cohere, AI21, Stability AI | PaLM 2, Gemini, Llama 2, Claude | GPT-4, GPT-3.5, Codex, DALL-E |
| OpenAI Models | No (but Claude alternative) | No (but Gemini/PaLM) | Yes (exclusive partnership) |
| Anthropic Claude | Yes | Yes | No |
| Google Models | No | Yes (Gemini, PaLM) | No |
| Open Source Models | Llama 2, Falcon, Mistral | Llama 2, Open models | Llama 2 (limited) |
| Image Generation | Stable Diffusion (Stability AI) | Imagen | DALL-E 2, DALL-E 3 |
| Code Generation | CodeWhisperer (separate) | Codey, Gemini | GitHub Copilot (partner), GPT-4 |
| Chat Interface | Amazon Q | N/A (Vertex AI Studio) | Azure OpenAI Playground |
| Embeddings | Titan Embeddings, Cohere | text-embedding-gecko | ada-002 embeddings |
| Fine-tuning | Limited | Yes | Yes (GPT-3.5, Ada) |
| Prompt Management | Prompt templates | Prompt design | Prompt engineering tools |
| Responsible AI | Guardrails | Vertex AI safety filters | Content filtering, abuse monitoring |
| Vector Database Integration | OpenSearch, RDS pgvector | Vertex AI Vector Search | Azure Cognitive Search |
| RAG Support | Knowledge Bases for Bedrock | Vertex AI Search, Grounding | Azure AI Search integration |
| Agents | Bedrock Agents | Vertex AI Agent Builder | Azure AI Agent Service (preview) |
| Model Deployment | Managed inference | Managed endpoints | Managed deployments |
| Pricing | Per token (input/output) | Per character/token | Per token (input/output) |
Documentation: - π AWS Bedrock Documentation - Foundation models - π AWS Bedrock Agents Documentation - AI agents - π AWS CodeWhisperer Documentation - AI code assistant - π GCP Vertex AI Generative AI Documentation - Generative AI overview - π GCP Gemini Documentation - Google's multimodal AI - π Azure OpenAI Service Documentation - OpenAI integration - π Azure OpenAI Models Documentation - Available models
Conversational AI & Chatbots¶
| Feature | AWS | GCP | Azure |
|---|---|---|---|
| Service Name | Amazon Lex | Dialogflow CX, Dialogflow ES | Azure Bot Service, Language Understanding (LUIS) |
| Intent Recognition | Yes | Yes | Yes |
| Entity Extraction | Yes | Yes | Yes |
| Multi-turn Conversations | Yes | Yes | Yes |
| Voice Integration | Connect, Polly, Transcribe | Speech APIs | Speech Service |
| Channels | Web, mobile, SMS, Slack, Facebook | Web, mobile, telephony, integrations | Teams, Slack, Facebook, web |
| Analytics | CloudWatch, Conversation logs | Analytics, Insights | Application Insights, Bot Analytics |
| Sentiment Analysis | Integration with Comprehend | Built-in | Built-in |
| Pre-built Agents | Bot templates | Pre-built agents | Bot templates |
| Pricing | Per request | Per session | Per message |
Documentation: - π AWS Lex Documentation - Conversational interfaces - π GCP Dialogflow CX Documentation - Advanced conversational AI - π GCP Dialogflow ES Documentation - Standard edition - π Azure Bot Service Documentation - Bot framework
Document Intelligence & Forms Processing¶
| Feature | AWS | GCP | Azure |
|---|---|---|---|
| Document OCR | Textract | Document AI | Form Recognizer, Document Intelligence |
| Form Extraction | Textract (Forms) | Document AI (Forms Parser) | Form Recognizer |
| Table Extraction | Textract (Tables) | Document AI (Tables) | Form Recognizer (Tables) |
| Invoice Processing | Textract (Invoices) | Document AI (Invoice Parser) | Form Recognizer (Invoices) |
| Receipt Processing | Textract (Receipts) | Document AI (Receipt Parser) | Form Recognizer (Receipts) |
| ID Document Processing | Textract (ID Documents) | Document AI (ID Parser) | Form Recognizer (ID Documents) |
| Custom Document Processing | Custom Textract | Custom Document AI | Custom Form Recognizer |
| Handwriting Recognition | Yes | Yes | Yes |
| Signature Detection | Yes | Yes | Yes |
| Layout Analysis | Yes | Yes | Yes |
| Queries | Textract Queries | N/A | N/A |
Documentation: - π AWS Textract Documentation - Document text extraction - π GCP Document AI Documentation - Document understanding - π Azure Form Recognizer Documentation - Form processing
Search & Recommendations¶
| Feature | AWS | GCP | Azure |
|---|---|---|---|
| Personalization | Amazon Personalize | Recommendations AI | Azure Personalizer |
| Search | OpenSearch, Kendra | Vertex AI Search, Enterprise Search | Cognitive Search |
| Recommendation Types | User personalization, ranking, similar items | Product recommendations, personalized ranking | Contextual bandit, reinforcement learning |
| Neural Search | Kendra | Vertex AI Search | Cognitive Search (vector search) |
| Document Search | Kendra | Vertex AI Search | Cognitive Search |
| E-commerce | Personalize | Recommendations AI (Retail) | Personalizer |
| Real-time | Yes | Yes | Yes |
| Cold Start | Yes | Yes | Yes |
Documentation: - π AWS Personalize Documentation - ML-powered recommendations - π AWS Kendra Documentation - Intelligent search - π GCP Recommendations AI Documentation - Product recommendations - π Azure Personalizer Documentation - Reinforcement learning
MLOps & Model Management¶
| Feature | AWS | GCP | Azure |
|---|---|---|---|
| Pipeline Orchestration | SageMaker Pipelines, Step Functions | Vertex AI Pipelines, Cloud Composer | Azure ML Pipelines |
| Experiment Tracking | SageMaker Experiments | Vertex AI Experiments | Azure ML Experiments, MLflow |
| Model Registry | SageMaker Model Registry | Vertex AI Model Registry | Azure ML Model Registry |
| Model Versioning | Yes | Yes | Yes |
| Model Lineage | SageMaker Lineage | Vertex AI Metadata | Azure ML lineage tracking |
| CI/CD Integration | CodePipeline, GitLab, GitHub Actions | Cloud Build, GitLab, GitHub Actions | Azure DevOps, GitHub Actions |
| Model Monitoring | Model Monitor | Vertex AI Model Monitoring | Model monitoring, data drift |
| Data Drift Detection | Yes | Yes | Yes |
| Model Performance | Yes | Yes | Yes |
| A/B Testing | Multi-model endpoints | Traffic splitting | Blue-green deployments |
| Shadow Deployments | Yes | Yes | Yes |
| Model Explainability | Clarify | Explainable AI | InterpretML, responsible AI dashboard |
| Bias Detection | Clarify | What-If Tool | Fairlearn integration |
| Infrastructure as Code | CloudFormation, CDK, Terraform | Terraform, Deployment Manager | ARM templates, Bicep, Terraform |
Documentation: - π SageMaker Pipelines Documentation - ML workflows - π SageMaker Model Monitor Documentation - Production monitoring - π Vertex AI Pipelines Documentation - Pipeline orchestration - π Azure ML Pipelines Documentation - Workflow automation
Training Infrastructure & Compute¶
| Feature | AWS | GCP | Azure |
|---|---|---|---|
| GPU Instances | P4, P5 (NVIDIA A100, H100) | A2, A3 (NVIDIA A100, H100) | NC, ND, NV series |
| TPU Support | No | Yes (TPU v4, v5) | No |
| Distributed Training | SageMaker distributed training | Multi-node, multi-GPU | Distributed training libraries |
| Spot/Preemptible Training | Managed Spot Training | Spot VMs | Low-priority VMs |
| Training Cost Savings | Up to 90% with Spot | Up to 91% with Spot | Up to 80% with Low-priority |
| Auto-scaling | Yes | Yes | Yes |
| Notebook Instances | SageMaker Notebooks | Vertex AI Workbench | Compute Instances |
| Managed Jupyter | Yes | Yes | Yes |
| Data Parallelism | Yes | Yes | Yes |
| Model Parallelism | Yes (SMP library) | Yes | Yes (DeepSpeed) |
Documentation: - π SageMaker Training Documentation - Model training - π Vertex AI Training Documentation - Custom training - π Azure ML Training Documentation - Training overview
Data Preparation & Feature Engineering¶
| Feature | AWS | GCP | Azure |
|---|---|---|---|
| Data Wrangler | SageMaker Data Wrangler | Vertex AI Feature Store | Azure ML Data Prep |
| Feature Store | SageMaker Feature Store | Vertex AI Feature Store | Azure ML Feature Store (preview) |
| Data Labeling | Ground Truth | Data Labeling Service | Data Labeling |
| AutoML Data Prep | Autopilot | Vertex AI AutoML | Automated ML |
| ETL Integration | Glue, EMR | Dataflow, Dataprep | Data Factory, Synapse |
| Feature Reuse | Yes | Yes | Yes |
| Online/Offline Store | Yes | Yes | Yes |
| Point-in-time Joins | Yes | Yes | Yes |
Documentation: - π SageMaker Data Wrangler Documentation - Data preparation - π SageMaker Feature Store Documentation - Feature management - π Vertex AI Feature Store Documentation - Feature serving - π Azure ML Feature Store Documentation - Feature engineering
Edge & IoT ML¶
| Feature | AWS | GCP | Azure |
|---|---|---|---|
| Edge Deployment | SageMaker Edge Manager | Edge TPU, TensorFlow Lite | Azure IoT Edge |
| Model Optimization | SageMaker Neo | Model Optimization Toolkit | ONNX Runtime |
| Supported Devices | ARM, x86, NVIDIA, IoT devices | Coral devices, mobile, edge | Raspberry Pi, NVIDIA, Intel |
| On-device Training | Limited | Yes | Limited |
| Model Compression | Neo compiler | TensorFlow Lite | ONNX optimization |
| OTA Updates | Yes | Yes | Yes |
| Monitoring | Edge Manager | Cloud IoT Core | IoT Hub |
Documentation: - π SageMaker Edge Manager Documentation - Edge deployment - π SageMaker Neo Documentation - Model optimization - π Edge TPU Documentation - Edge AI accelerator - π Azure IoT Edge ML Documentation - Edge computing
Specialized AI Services¶
AWS-Specific Services¶
| Service | Description |
|---|---|
| Amazon CodeGuru | ML-powered code reviews and performance recommendations |
| Amazon DevOps Guru | ML-powered operational insights |
| Amazon Fraud Detector | Fraud detection service |
| Amazon Forecast | Time-series forecasting |
| Amazon Lookout for Vision | Anomaly detection in images |
| Amazon Lookout for Metrics | Anomaly detection in metrics |
| Amazon Lookout for Equipment | Predictive maintenance |
| Amazon HealthLake | Healthcare data storage and ML |
| Amazon Monitron | Equipment monitoring |
GCP-Specific Services¶
| Service | Description |
|---|---|
| Contact Center AI | Call center automation |
| Discovery AI | Data cataloging and discovery |
| Anti-Money Laundering AI | Financial crime detection |
| Lending DocAI | Loan document processing |
| Procurement DocAI | Purchase order processing |
| Cloud Talent Solution | Job search and matching |
Azure-Specific Services¶
| Service | Description |
|---|---|
| Azure Metrics Advisor | Anomaly detection in metrics |
| Azure Video Analyzer | Video analytics |
| Azure Immersive Reader | Reading assistance AI |
| Azure Content Safety | Content moderation |
| Azure Applied AI Services | Industry-specific AI solutions |
Pricing Comparison (Approximate)¶
ML Training (1 hour on GPU)¶
| Provider | Instance Type | GPUs | Cost per Hour |
|---|---|---|---|
| AWS | ml.p3.2xlarge | 1x V100 | $3.06 |
| AWS | ml.p4d.24xlarge | 8x A100 | $32.77 |
| GCP | n1-standard-8 + 1 V100 | 1x V100 | $2.48 |
| GCP | a2-highgpu-8g | 8x A100 | $24.96 |
| Azure | NC6s v3 | 1x V100 | $3.06 |
| Azure | ND96asr v4 | 8x A100 | $27.20 |
Inference/Prediction¶
| Service | Pricing Model | Cost |
|---|---|---|
| SageMaker Real-time | Per instance hour | $0.065/hour (ml.t3.medium) |
| SageMaker Serverless | Per compute + invocations | $0.20/hour compute + $0.20/1K requests |
| Vertex AI Prediction | Per hour | $0.056/hour (n1-standard-2) |
| Azure ML Online Endpoint | Per hour | $0.073/hour (Standard_DS2_v2) |
AutoML Training¶
| Service | Pricing Model | Approximate Cost |
|---|---|---|
| SageMaker Autopilot | Per instance hour | ~$0.24/hour (ml.m5.xlarge) |
| Vertex AI AutoML | Per node hour | $19.32/hour (tabular) |
| Azure AutoML | Per compute hour | ~$0.20/hour (compute) |
AI Services (Pay-per-use)¶
| Service Type | AWS | GCP | Azure |
|---|---|---|---|
| Image Analysis | $0.001/image (Rekognition) | $1.50/1K images (Vision) | $1.00/1K images (Computer Vision) |
| Text Analysis | $0.0001/100 chars (Comprehend) | $1.00/1K records (NL) | $2.00/1K records (Text Analytics) |
| Speech-to-Text | $0.024/min (Transcribe) | $0.024/min | $1.00/hour |
| Text-to-Speech | $4.00/1M chars (Polly) | $4.00/1M chars | $4.00/1M chars |
| Translation | $15.00/1M chars | $20.00/1M chars | $10.00/1M chars |
Generative AI (per 1K tokens)¶
| Provider | Model | Input | Output |
|---|---|---|---|
| AWS Bedrock | Claude 3 Sonnet | $0.003 | $0.015 |
| AWS Bedrock | Claude 3 Opus | $0.015 | $0.075 |
| AWS Bedrock | Llama 2 70B | $0.00195 | $0.00256 |
| GCP Vertex AI | Gemini Pro | $0.000125 | $0.000375 |
| GCP Vertex AI | PaLM 2 | $0.001 | $0.001 |
| Azure OpenAI | GPT-4 | $0.03 | $0.06 |
| Azure OpenAI | GPT-3.5 Turbo | $0.0005 | $0.0015 |
Note: Prices vary by region and are subject to change. Always use official pricing calculators.
Pricing Calculators: - π AWS Pricing Calculator - AWS cost estimates - π GCP Pricing Calculator - GCP cost estimates - π Azure Pricing Calculator - Azure cost estimates
CLI/SDK Command Comparison¶
Train a Model¶
AWS SageMaker (Python SDK):
from sagemaker.estimator import Estimator
estimator = Estimator(
image_uri='683313688378.dkr.ecr.us-east-1.amazonaws.com/sagemaker-xgboost:latest',
role='arn:aws:iam::123456789012:role/SageMakerRole',
instance_count=1,
instance_type='ml.m5.xlarge',
output_path='s3://bucket/output'
)
estimator.fit({'train': 's3://bucket/train'})
GCP Vertex AI (Python SDK):
from google.cloud import aiplatform
aiplatform.init(project='my-project', location='us-central1')
job = aiplatform.CustomTrainingJob(
display_name='training-job',
container_uri='gcr.io/my-project/training-image',
model_serving_container_image_uri='gcr.io/my-project/serving-image'
)
model = job.run(
dataset=dataset,
model_display_name='my-model',
machine_type='n1-standard-4',
)
Azure ML (Python SDK):
from azure.ai.ml import command
job = command(
code='./src',
command='python train.py',
environment='AzureML-sklearn-0.24:1',
compute='cpu-cluster',
experiment_name='training-experiment'
)
ml_client.jobs.create_or_update(job)
Deploy a Model¶
AWS SageMaker:
predictor = estimator.deploy(
initial_instance_count=1,
instance_type='ml.m5.xlarge',
endpoint_name='my-endpoint'
)
# Make predictions
result = predictor.predict(data)
GCP Vertex AI:
endpoint = model.deploy(
machine_type='n1-standard-4',
min_replica_count=1,
max_replica_count=10
)
# Make predictions
prediction = endpoint.predict(instances=[data])
Azure ML:
from azure.ai.ml.entities import ManagedOnlineEndpoint, ManagedOnlineDeployment
endpoint = ManagedOnlineEndpoint(name='my-endpoint')
ml_client.online_endpoints.begin_create_or_update(endpoint)
deployment = ManagedOnlineDeployment(
name='blue',
endpoint_name='my-endpoint',
model=model,
instance_type='Standard_DS2_v2',
instance_count=1
)
ml_client.online_deployments.begin_create_or_update(deployment)
Image Analysis¶
AWS Rekognition (CLI):
aws rekognition detect-labels \
--image '{"S3Object":{"Bucket":"my-bucket","Name":"image.jpg"}}' \
--max-labels 10 \
--min-confidence 75
GCP Vision AI (gcloud):
gcloud ml vision detect-labels gs://my-bucket/image.jpg
Azure Computer Vision (CLI):
az cognitiveservices account vision analyze \
--resource-group myResourceGroup \
--name myComputerVision \
--image-url https://example.com/image.jpg \
--visual-features Categories,Description,Tags
Text Analysis¶
AWS Comprehend:
aws comprehend detect-sentiment \
--text "I love this product!" \
--language-code en
GCP Natural Language:
curl -X POST \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/json" \
"https://language.googleapis.com/v1/documents:analyzeSentiment" \
-d '{
"document": {
"type": "PLAIN_TEXT",
"content": "I love this product!"
}
}'
Azure Text Analytics:
az cognitiveservices account text-analytics sentiment \
--resource-group myResourceGroup \
--name myTextAnalytics \
--documents "I love this product!"
Speech-to-Text¶
AWS Transcribe:
import boto3
transcribe = boto3.client('transcribe')
transcribe.start_transcription_job(
TranscriptionJobName='my-job',
Media={'MediaFileUri': 's3://bucket/audio.mp3'},
MediaFormat='mp3',
LanguageCode='en-US'
)
GCP Speech-to-Text:
from google.cloud import speech
client = speech.SpeechClient()
audio = speech.RecognitionAudio(uri='gs://bucket/audio.mp3')
config = speech.RecognitionConfig(
encoding=speech.RecognitionConfig.AudioEncoding.MP3,
language_code='en-US'
)
response = client.recognize(config=config, audio=audio)
Azure Speech:
import azure.cognitiveservices.speech as speechsdk
speech_config = speechsdk.SpeechConfig(
subscription='your-key',
region='eastus'
)
audio_config = speechsdk.audio.AudioConfig(filename='audio.wav')
speech_recognizer = speechsdk.SpeechRecognizer(
speech_config=speech_config,
audio_config=audio_config
)
result = speech_recognizer.recognize_once()
Generative AI (LLM)¶
AWS Bedrock:
import boto3
import json
bedrock = boto3.client('bedrock-runtime')
response = bedrock.invoke_model(
modelId='anthropic.claude-3-sonnet-20240229-v1:0',
body=json.dumps({
'anthropic_version': 'bedrock-2023-05-31',
'max_tokens': 1000,
'messages': [
{'role': 'user', 'content': 'Explain quantum computing'}
]
})
)
GCP Vertex AI (Gemini):
from vertexai.preview.generative_models import GenerativeModel
model = GenerativeModel('gemini-pro')
response = model.generate_content('Explain quantum computing')
print(response.text)
Azure OpenAI:
import openai
openai.api_type = 'azure'
openai.api_key = 'your-key'
openai.api_base = 'https://your-resource.openai.azure.com/'
openai.api_version = '2023-05-15'
response = openai.ChatCompletion.create(
engine='gpt-4',
messages=[
{'role': 'user', 'content': 'Explain quantum computing'}
]
)
Decision Tree: Which AI/ML Service?¶
ML Platform Selection¶
Use AWS SageMaker if: - β Already heavily invested in AWS ecosystem - β Need comprehensive end-to-end ML platform - β Want strong enterprise features and governance - β Need specialized services (Forecast, Fraud Detector) - β Require extensive built-in algorithms
Use GCP Vertex AI if: - β Want Google's advanced AI research (Gemini, PaLM) - β Need TPU support for training - β Prefer integrated BigQuery and GCP data services - β Want simplified unified ML platform - β Need strong AutoML capabilities
Use Azure ML if: - β Microsoft/Azure enterprise integration - β Need strong MLOps and DevOps integration - β Want ONNX model format support - β Require hybrid cloud ML (Azure Arc) - β Need integration with Microsoft tools (VS Code, Power BI)
Generative AI Platform Selection¶
Use AWS Bedrock if: - β Want access to Anthropic Claude models - β Need multiple foundation model options - β Prefer serverless, pay-per-use pricing - β Want managed RAG with Knowledge Bases - β Need AI agents and guardrails
Use GCP Vertex AI if: - β Want Google's Gemini models - β Need multimodal AI capabilities - β Prefer Google's AI research advantages - β Want integrated search and grounding - β Need tighter BigQuery integration
Use Azure OpenAI if: - β Need GPT-4 and OpenAI models - β Require enterprise-grade OpenAI with SLAs - β Want Azure enterprise security and compliance - β Need integration with Microsoft ecosystem - β Require content filtering and responsible AI
Computer Vision¶
Use AWS Rekognition if: - β Need celebrity recognition - β Want facial recognition for security - β Need video analysis with Kinesis integration - β Require PPE detection
Use GCP Vision AI if: - β Need best OCR accuracy - β Want product search in images - β Need handwriting recognition - β Require AutoML Vision for custom models
Use Azure Computer Vision if: - β Need spatial analysis - β Want Read API for document OCR - β Need Custom Vision for quick custom models - β Require face verification/identification
NLP Selection¶
Use AWS Comprehend if: - β Need PII detection and redaction - β Want topic modeling - β Need custom classification - β Require medical text analysis
Use GCP Natural Language if: - β Need syntax analysis - β Want content classification - β Need AutoML for custom models - β Require healthcare NLP
Use Azure Text Analytics if: - β Need key phrase extraction - β Want opinion mining - β Need healthcare-specific text analysis - β Require conversational language understanding
Training Infrastructure¶
Use SageMaker if: - β Need managed Spot training - β Want comprehensive built-in algorithms - β Need distributed training library (SMP) - β Require inference optimization (Neo)
Use Vertex AI if: - β Need TPU support - β Want best TensorFlow integration - β Need hyperparameter tuning (Vizier) - β Require custom containers
Use Azure ML if: - β Need ONNX model support - β Want automated ML - β Need designer (no-code training) - β Require parallel training across regions
Key Takeaways¶
AWS AI/ML Strengths¶
- β Most comprehensive AI/ML service portfolio
- β Strong foundation model selection (Bedrock)
- β Excellent specialized services (Forecast, Fraud Detector, Personalize)
- β Mature MLOps capabilities
- β Best integration with AWS ecosystem
- β Strong document intelligence (Textract)
GCP AI/ML Strengths¶
- β Best AI research foundation (Gemini, PaLM)
- β TPU support for high-performance training
- β Superior AutoML capabilities
- β Unified Vertex AI platform
- β Best BigQuery ML integration
- β Strong document AI capabilities
- β Advanced explainable AI
Azure AI/ML Strengths¶
- β Exclusive OpenAI partnership (GPT-4, DALL-E)
- β Best Microsoft ecosystem integration
- β Strong MLOps and DevOps integration
- β Comprehensive cognitive services
- β Hybrid cloud ML (Azure Arc)
- β ONNX model format support
- β Strong responsible AI tooling
Best Practices Across All Platforms¶
Model Development¶
- Start with AutoML for baseline
- Use managed notebooks for experimentation
- Implement experiment tracking from day one
- Version your datasets and models
- Use feature stores for reusable features
Training¶
- Start small, scale up gradually
- Use spot/preemptible instances for cost savings
- Implement distributed training for large models
- Monitor training metrics in real-time
- Use hyperparameter tuning
Deployment¶
- Use model registry for versioning
- Implement A/B testing for new models
- Start with lower-cost instances
- Enable auto-scaling for production
- Use batch inference when real-time isn't needed
Monitoring¶
- Implement data drift detection
- Monitor model performance continuously
- Set up alerts for anomalies
- Track prediction latency and costs
- Regularly retrain models
Security¶
- Use IAM roles/service accounts (never keys)
- Encrypt data at rest and in transit
- Implement content filtering for generative AI
- Use private endpoints for sensitive workloads
- Enable audit logging
Cost Optimization¶
- Use serverless inference when possible
- Choose right-sized instances
- Implement auto-scaling
- Use spot instances for training
- Clean up unused models and endpoints
- Monitor and set budget alerts
Related Guides¶
- Compute Service Comparison
- Storage Service Comparison
- Database Service Comparison
- Networking Service Comparison
Additional Resources: - π AWS AI/ML Blog - Latest ML updates - π GCP AI Blog - AI announcements - π Azure AI Blog - ML insights - π AWS ML University - Free ML courses - π Google AI Education - Learning resources - π Microsoft Learn AI - AI training paths
Related Guides: - GenAI Platforms Comparison - LLM Observability Comparison - Vector Databases Comparison - Agent Frameworks Comparison - LLM Serving Decision Matrix