Loading page
Complete guide to deploying ML systems on AWS with FastAPI, Airflow, MLFlow, and SQS
Reference material for deploying an ML service. Need a self-hosted setup first? Start with self-host, or see the Kubernetes guide.
GuideReference steps and examples; nothing here is connected or running. Generic teaching material; it does not describe how this app is deployed.
┌─────────────────────────────────────────────────────────────────────────────┐ │ AWS MLOps Architecture │ │ │ │ ┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐ │ │ │ API Gateway │────▶│ FastAPI (ECS) │────▶│ MLFlow (EC2) │ │ │ │ + WAF │ │ Model Serving │ │ Model Registry │ │ │ └─────────────────┘ └────────┬────────┘ └────────┬────────┘ │ │ │ │ │ │ ▼ │ │ │ ┌─────────────────┐ ┌─────────────────┐ │ │ │ │ SQS Queues │◀───▶│ Airflow (MWAA) │◀─────────────┘ │ │ │ - Training │ │ Orchestration │ │ │ │ - Inference │ └────────┬────────┘ │ │ │ - Dead Letter │ │ │ │ └─────────────────┘ ▼ │ │ ┌─────────────────┐ │ │ │ S3 Buckets │ │ │ │ - Models │ │ │ │ - Data │ │ │ │ - Artifacts │ │ │ └─────────────────┘ │ │ │ │ ┌────────────────────────────────────────────────────────────────────────┐ │ │ │ Supporting Services: RDS (PostgreSQL), ElastiCache, CloudWatch, VPC │ │ │ └────────────────────────────────────────────────────────────────────────┘ │ └─────────────────────────────────────────────────────────────────────────────┘
aws ecs list-services --cluster <cluster>aws ecs update-service --cluster <cluster> --service <service> --force-new-deploymentaws sqs get-queue-attributes --queue-url <queue-url> --attribute-names Allaws sqs purge-queue --queue-url <queue-url>