Which Cloud for What: AWS, Azure, Google Cloud, GPU Clouds, Edge and Platforms
There is no best cloud, only a better fit. The image runs anywhere; your data, permissions and team habits don't move so easily. Five jobs, their names on each cloud, three other kinds of home, and four questions that pick one.
What you will learn
- Explain why a container image can run on any cloud, and what is harder to move
- Name the five jobs a model API needs from a cloud, with their names on AWS, Azure and Google Cloud
- Say when a GPU cloud, the edge or a platform service fits better than the big three
- Pick a home with four questions asked in order
Before you start
- Containerising a Model API: A Dockerfile
- CI/CD for ML: A Quality Gate
Everybody asks it: which cloud should I use? The honest answer is that there's no best cloud. There's a better fit for your situation. By the end of this article you'll have four questions that pick one for you.
Our example is the ticket priority service: a small FastAPI app that scores support tickets, already packed into a container image. It has a trained model, it passed its quality gate, and now the image needs somewhere to run.
Which neighbourhood is best?
Say you're opening a small shop. Which neighbourhood is best? Well, it depends. Are your customers there already? Are your suppliers close by? Do you need something special, like a loading dock? You don't look for the best place. You look for the one that fits your shop. Choosing a cloud works the same way.
The image doesn't know where it is
Good news first. Our ticket service is one container image: the Python base, the libraries, our code and the model, stacked together (see containerising a model API). Nothing inside it knows which cloud it's on, so any cloud that runs containers can run it.
What's harder to move is what's around it: your data, your permissions and your team's habits.
The big three, alphabetically
In alphabetical order, because this isn't a ranking:
- AWS has a wide catalogue of services, and lots of engineers already know it.
- Azure fits naturally when a company already runs on Microsoft, with its logins, office accounts and support contracts.
- Google Cloud is a common pick when your data is already in BigQuery, or when you like Cloud Run.
All three can run our container: Fargate on AWS, Container Apps on Azure, Cloud Run on Google Cloud. So the question isn't whether it works. It's what's already around you.
Five jobs, different names
Our service needs five things from any cloud. Each cloud does the same five jobs under its own names:
| Job | AWS | Azure | Google Cloud |
|---|---|---|---|
| A shelf for the image (registry) | Amazon ECR | Container Registry | Artifact Registry |
| A place to run the container | Fargate | Container Apps | Cloud Run |
| A safe place for the key (secret) | Secrets Manager | Key Vault | Secret Manager |
| Somewhere for the logs | CloudWatch | Azure Monitor | Cloud Logging |
| A budget alert | AWS Budgets | Cost Management | Cloud Billing budgets |
Learn the jobs, and the names get easy. The AWS route for these five is walked through in deploying the model API to AWS.
Three other kinds of home
- GPU clouds rent you graphics cards, for a training job or a heavy model. Good when the GPU is the point.
- Edge means running close to the user. Good for small models, fast replies, or data that has to stay on site.
- Platform services just run your code or image and give you a web address. Render, Railway and Fly.io are examples. Great for a small team or a first launch.
The catch: you get less around them. Databases, permissions and private networks may need another home, often one of the big three.
Four questions, in order
- Where's your data, and what does your team already know? Moving data is slow and costs money.
- What does the workload need? A small CPU service, or GPUs?
- Who runs it? With a couple of people, you want more done for you.
- Where are your users, and are there rules about where data can sit?
Notice what isn't on the list: which cloud is the most popular this month.
Three cases
| Case | What decides it | Home |
|---|---|---|
| Our ticket service: small CPU container, small team | Any cloud works, so use what the team knows | AWS (what this team knows) |
| A company that already runs on Microsoft | Logins and permissions are already there (question 1) | Azure |
| A long training run on a large model | The workload needs GPUs (question 2) | A GPU cloud for training, then serve where the app already sits |
Each extra cloud means more accounts, permissions and bills. Add one only when a question forces it.
Common mistakes
- Looking for a ranking. The same service is fine on all three. Fit beats fame.
- Forgetting the data. A model next to its data is cheaper and faster than one that pulls it across clouds.
- Going multi-cloud on day one. Two clouds mean two of everything to manage.
Recap
| Idea | Remember |
|---|---|
| Fit, not a ranking | A container image keeps your options open |
| Five jobs | Registry, run, secret, logs, budget: same jobs, new names |
| Other homes | GPU clouds, edge, platform services: one need each |
| Four questions | Data and team, workload, who runs it, users and rules |
Try it yourself: take a project of yours, write one line for each of the four questions, and see which home is left.
Built this? Share your solution in the StudyEasy AI Community.
Join free on Skool →CI/CD for ML: A Quality Gate That Blocks a Weaker Model, Even When Every Test Passes
Next →IaaS, PaaS, Containers or Serverless? Choosing Where a Model API Runs
StudyEasy AI Community
Learn AI engineering, share what you build, and connect with other learners.
Free resources: lesson files, notebooks and code
Ask questions and join engineering discussions
Meet real people learning and building with AI
Machine Learning Engineer: From First Model to ML Engineer
Learn machine learning in Python, then ship it: data analysis, regression, classification, tuning, deployment and MLOps.View on Udemy ↗: Machine Learning Engineer: From First Model to ML Engineer (opens in a new tab)Related articles
Python Virtual Environments: One Project, One Toolbox
Why every Python project gets its own virtual environment: two projects that need different versions of requests, python -m venv .venv, activation, pip install and the PyCharm setting that activates it for you.
Git and GitHub Fundamentals: Commits, Branches, Push and Pull
The Git you use every day, on a tiny hello-ml project: commits as save points, the staging area, a branch merged with a fast-forward, then push, clone, pull and pull requests with a teammate.
Testing a FastAPI App with pytest: Three Small Tests
A tiny FastAPI app with a Hello World route and a name route that refuses numbers, three pytest tests that check it, and what happens when the validation is deleted by mistake.
Config and Logging Instead of Hard-Coded Values in ML Training
Take the hard-coded values out of a car price training script: one config.toml read with tomllib, logging with levels and a run id on every line, and secrets read from the environment. Same RMSE, 2195, before and after.