Every serious LLM workload eventually faces the same decision: rent managed services from a hyperscaler, orchestrate your own GPU fleet, or run models through an API provider. AWS, GCP, and Azure all offer paths across that spectrum, and the right answer depends less on brand preference than on where your data already lives, which accelerators you can actually get, and how much operational control your team wants to own. Managed endpoints that save a month of engineering can still be the wrong choice if the per-token economics break at your traffic shape.
This lesson compares the three clouds on the axes that actually matter for LLM work â compute availability, serving and fine-tuning surfaces, networking and data gravity, and cost structure â then shows how to model spend before you commit, plus when a multi-cloud or hybrid setup is justified and when it is just expensive insurance.
The managed spectrum: APIs, endpoints, and raw clusters
All three providers present three distinct layers, and confusing them is the most common sourcing mistake. The top layer is a hosted model API â you send tokens, you pay per token, and you own nothing below the HTTP call. The middle layer is managed endpoints on dedicated accelerators: your weights, their orchestration, billed by instance-hour. The bottom layer is raw GPU virtual machines or reserved capacity clusters where you run the serving stack yourself.
APIs win on speed to market and variable traffic; they lose on unit economics at sustained volume and on customization depth. Managed endpoints sit in the middle and are usually the right production default for teams without a dedicated inference-platform group. Raw clusters only make sense with steady high utilization, specialized serving requirements, or compliance constraints that forbid third-party model hosting.
| Layer | AWS | GCP | Azure | Billed by |
|---|---|---|---|---|
| Hosted model API | Bedrock model catalog | Vertex AI Model Garden | Azure OpenAI, others | Per token |
| Managed endpoint | SageMaker endpoints | Vertex AI endpoints | Azure ML endpoints | Instance-hour |
| Fine-tuning service | Bedrock customization | Vertex custom jobs | Azure OpenAI fine-tuning | Job + tokens |
| Raw accelerators | EC2 P/G/Trn instances | A2/G2, TPU VMs | NC/ND VMs | Instance-hour |
| Serverless inference | SageMaker Serverless | Vertex prediction | Azure ML serverless | Per use |
What each cloud is genuinely good at
AWS's advantage is breadth and accelerator diversity: P5 and P6 instance families for training, G-series for inference, Trainium and Inferentia for cost-sensitive workloads, and the deepest ecosystem of third-party marketplace images and tooling. SageMaker remains the most mature ML operations surface of the three, with hosted training, endpoints, and experiment tracking that larger enterprises already have procurement relationships for. The friction is complexity and pricing layers â costs accumulate across instances, storage, data transfer, and endpoint hours in ways that demand active FinOps.
GCP's advantages are data gravity for organizations already on BigQuery, first-class TPU access for TensorFlow and JAX training stacks, and networking that is consistently well regarded. Vertex AI's model garden and tuning jobs have closed much of the historical gap with SageMaker. Accelerator availability in specific regions can be tighter than AWS, which matters when capacity crunches hit.
Azure's decisive advantage is the OpenAI relationship: direct GPT-class model access with enterprise agreements, region choice, and fine-tuning through a single control plane. For shops standardized on Microsoft identity, networking, and DevOps tooling, that integration is worth more than a spec-sheet comparison. The trade-off is that the platform is strongest when you stay inside the Azure OpenAI lane; general-purpose ML orchestration is capable but less deep than SageMaker.
Modeling spend before you commit
Unit economics should be modeled from your own traffic, not from list prices alone. The example below prices three archetypes â a bursty API workload, a steady managed endpoint, and a self-hosted fleet â using representative placeholder rates you would replace with current pricing before any decision.
from dataclasses import dataclass
@dataclass
class Workload:
requests_per_day: int
avg_input_tokens: int
avg_output_tokens: int
def api_cost(w: Workload, in_per_1k: float, out_per_1k: float) -> float:
monthly_in = w.requests_per_day * 30 * w.avg_input_tokens / 1000
monthly_out = w.requests_per_day * 30 * w.avg_output_tokens / 1000
return round(monthly_in * in_per_1k + monthly_out * out_per_1k, 2)
def endpoint_cost(gpu_hours_per_day: float, hourly: float,
replicas: int = 1) -> float:
return round(gpu_hours_per_day * 30 * hourly * replicas, 2)
def self_hosted_cost(gpu_hours_per_day: float, hourly: float,
overhead_factor: float = 1.35) -> float:
return round(gpu_hours_per_day * 30 * hourly * overhead_factor, 2)
workload = Workload(requests_per_day=200_000,
avg_input_tokens=800, avg_output_tokens=400)
print("API monthly:", api_cost(workload, 2.5, 10.0))
print("Managed endpoint (4 GPUs):",
endpoint_cost(gpu_hours_per_day=24, hourly=4.5, replicas=4))
print("Self-hosted with 35% ops overhead:",
self_hosted_cost(gpu_hours_per_day=24, hourly=3.2))
The overhead factor in the self-hosted estimate is the part most business cases omit: the engineering time, observability tooling, and idle capacity that come with owning the stack. Managed endpoints usually win until utilization is consistently high, at which point self-hosting starts compounding savings. Spot or preemptible capacity can invert the math for training jobs that tolerate interruption, often at 60â80 percent discounts â provided your checkpoint-resume story is solid.
Networking, data gravity, and where your tokens live
Model endpoints are only as fast as the path your application takes to reach them, and data gravity quietly shapes that path. Keeping a vector store, feature pipeline, and model endpoint in the same region eliminates cross-region latency and the egress fees that accompany it; splitting them across regions to use a cheaper accelerator can cost more in transfer than it saves in compute. Multi-region user bases complicate this further: serving everyone from one region adds 100â300 ms of round-trip time for distant users, which is visible and often unacceptable in chat products.
from dataclasses import dataclass
@dataclass
class TrafficPath:
cross_region_gb_month: float
requests_per_month: int
avg_response_kb: float
egress_per_gb: float = 0.09
def monthly_egress_usd(self) -> float:
request_gb = self.requests_per_month * self.avg_response_kb / 1e6
return round((self.cross_region_gb_month + request_gb)
* self.egress_per_gb, 2)
path = TrafficPath(cross_region_gb_month=2000, requests_per_month=50_000_000,
avg_response_kb=8)
print("monthly egress USD:", path.monthly_egress_usd())
The practical rule is to co-locate the entire inference path â cache, retrieval, model, and logging â in one region per user population, and to price any proposed split using real traffic numbers rather than list-price intuition. Egress is one of the few LLM cost lines that scales directly with user success, which makes it worth forecasting early.
Spot capacity, quotas, and the realities of GPU scarcity
Three operational realities shape LLM cloud budgets more than architecture diagrams do. First, GPU quotas are requested, not guaranteed: new accounts often cannot order large accelerator counts until they establish history, so request quotas early and in multiple regions. Second, spot capacity is abundant until it is not; build training jobs that checkpoint frequently and serving systems that route around preemption windows. Third, data transfer costs â egress in particular â become material when you fan model outputs to multiple regions or keep training data far from your training cluster.
Reserved capacity and committed-use discounts are the counterweight: they trade flexibility for 30â60 percent savings on predictable baseline load. A healthy LLM cost profile usually blends all three â reserved for the floor, on-demand for the variable layer, spot for interruptible training â with automated scaling rules deciding between them by time of day and queue depth.
| Cost lever | Typical discount | Best applied to | Risk |
|---|---|---|---|
| Spot / preemptible | 60â80% | Training, batch inference | Interruption |
| Reserved / committed use | 30â60% | Baseline serving load | Over-commitment |
| Auto-scaling to zero | Varies | Internal tools, dev envs | Cold-start latency |
| Right-sizing endpoints | 20â50% | Inference fleets | Under-provisioning |
| Caching common responses | 10â40% | Repeat-heavy traffic | Staleness |
Multi-cloud: when it is strategy and when it is theater
Multi-cloud LLM architecture is sometimes a genuine requirement â data residency by geography, negotiating leverage with a primary provider, or best-of-breed model access across catalogs. It is also frequently expensive theater: duplicating pipelines, identity, observability, and staffing across providers for a theoretical exit scenario that will never execute. A pragmatic middle path is portability without parallel operation â containerize serving, keep model artifacts in a neutral format, abstract the model client, and avoid proprietary services in the critical path unless their value clearly exceeds the lock-in.
The honest test: if migrating one provider's models and endpoints to another would take your team under a quarter using the abstractions you already have, you have real portability. If it would take a year, you do not have multi-cloud â you have two of everything and a story.
Common Mistakes
Comparing clouds on list prices without modeling your own token and traffic mix
Fix: Build the three-layer cost model from production traffic estimates before any procurement conversation.
Self-hosting from day one to save money
Fix: Managed endpoints usually win until utilization is consistently high; revisit self-hosting once the numbers are boring and stable.
Ignoring quota lead times in launch plans
Fix: Request accelerator quotas in multiple regions early â capacity and approval both take longer than expected.
Treating spot discounts as free savings
Fix: Spot requires checkpointed, resumable jobs; without that automation, interruptions cost more than the discount saves.
Building full multi-cloud operations for an untested exit scenario
Fix: Aim for artifact and interface portability; run on one cloud well before you run on two badly.
Best Practices
- Keep a live cost dashboard segmented by API calls, endpoint hours, and storage; LLM spend moves fastest of any cloud line item.
- Match workload shape to pricing tier automatically: reserved floor, on-demand variable, spot for interruptible jobs.
- Put budget alerts and per-feature cost attribution in place before launch, not after the first invoice shock.
- Evaluate accelerator alternatives â Trainium, TPU, cheaper inference chips â whenever a workload is stable enough to port.
- Review egress and cross-region traffic quarterly; they are the quietest and most surprising part of LLM cloud bills.
Key Takeaways
- Managed LLM infrastructure comes in three layers â hosted APIs, managed endpoints, and raw accelerators â with different control and cost trade-offs.
- AWS leads on accelerator breadth and ML tooling depth, GCP on data gravity and TPU access, Azure on OpenAI integration and Microsoft identity.
- Model spend from your own traffic across all three layers; self-hosting only wins at sustained high utilization once ops overhead is counted.
- Spot, reserved, and on-demand capacity should be blended by workload type, with automation deciding between them.
- Real portability means neutral artifacts and abstracted clients, not duplicated operations on every provider at once.