SageMaker Endpoint vs EC2 + vLLM Cost: Matched Prices From ml.g5.xlarge to ml.p5 and When Each Is Cheaper
A buyer's guide using AWS's November 2026 us-east-1 price lists: the SageMaker premium per instance pair, what it does to cost per million tokens, and which option fits which team.
Self-hosting vLLM on EC2 is cheaper than a SageMaker real-time endpoint for any GPU that stays busy, because both can run the same vLLM engine and SageMaker charges a fixed premium for the same instance. AWS's us-east-1 price lists on November 17, 2026 set that premium at 40% for ml.g5.xlarge ($1.408 an hour against $1.006 for g5.xlarge) and ml.g6e.xlarge, 25% for ml.g5.2xlarge and ml.g5.12xlarge, and 15% for ml.p4d.24xlarge and ml.p5.48xlarge. SageMaker is the cheaper choice for small fleets where the premium is worth less than the engineer hours it saves, and for spiky traffic where its endpoint is switched off for hours an EC2 fleet would leave running.
The matched prices
Every figure below comes from AWS's own machine-readable price lists for US East (N. Virginia), Linux, published November 17 and 18, 2026 (UTC): the SageMaker list's "Hosting" lines and the EC2 on-demand data that feeds AWS's EC2 pricing page. Monthly figures assume 730 hours.
| Instance pair (GPUs) | EC2 on-demand | SageMaker hosting | SageMaker premium per month |
|---|---|---|---|
| g5.xlarge (1x A10G, 24 GB) | $1.006/h ($734/mo) | $1.408/h ($1,028/mo) | $293 (40%) |
| g5.2xlarge (1x A10G, 24 GB) | $1.212/h ($885/mo) | $1.515/h ($1,106/mo) | $221 (25%) |
| g5.12xlarge (4x A10G, 96 GB) | $5.672/h ($4,141/mo) | $7.090/h ($5,176/mo) | $1,035 (25%) |
| g6e.xlarge (1x L40S, 48 GB) | $1.861/h ($1,359/mo) | $2.605/h ($1,902/mo) | $543 (40%) |
| p4d.24xlarge (8x A100, 320 GB) | $21.958/h ($16,029/mo) | $25.251/h ($18,433/mo) | $2,404 (15%) |
| p5.48xlarge (8x H100, 640 GB) | $55.04/h ($40,179/mo) | $63.296/h ($46,206/mo) | $6,027 (15%) |
The four-GPU g6e.12xlarge, with four L40S, follows the 25% band: $10.49 an hour on EC2, $13.12 on SageMaker, a $1,915 monthly gap. GPU specifications are from AWS's instance pages.
Commitments keep the same order. On one-year, no-upfront terms, a SageMaker Savings Plan brings ml.g5.xlarge to $1.109 an hour, an EC2 Compute Savings Plan brings g5.xlarge to $0.792, and an EC2 Instance Savings Plan, tied to the g5 family in one region, brings it to $0.634. For p5.48xlarge the three rates are $49.85, $43.34 and $34.68. The SageMaker plan stays 40%, 25% or 15% above the Compute plan for every pair, and 38% to 75% above the EC2 Instance plan, which takes 37% off on-demand. EC2 also offers Spot, which AWS describes as spare capacity at "steep discounts" that can be reclaimed; the SageMaker pricing page does not mention Spot for real-time endpoints. Spot prices change continuously and are not quoted here.
From hourly price to cost per million tokens
SageMaker's LLM containers run the same engines you would run yourself. AWS's Large Model Inference documentation says it provides "containers that support vLLM and TensorRT-LLM to deploy LLMs on AWS SageMaker Endpoints." vLLM itself is Apache 2.0 software with continuous batching and an OpenAI-compatible server. Same engine on the same GPU should mean comparable tokens per second. Neither AWS nor the vLLM project has published a like-for-like measurement of vLLM on SageMaker LMI against raw EC2, and this guide does not supply one.
The conversion is: cost per million output tokens = hourly rate ÷ (tokens per second × 3,600) × 1,000,000 ÷ utilisation. Throughput depends on your model, prompt lengths and batch settings, so use your own benchmark. With a placeholder of 1,000 output tokens per second per instance, which is an assumption rather than a measurement, a fully busy g5.xlarge costs $0.28 per million tokens on EC2 and $0.39 on SageMaker. At 90% utilisation that becomes $0.31 against $0.43; at 60%, $0.47 against $0.65; at 30%, $0.93 against $1.30; and at 10%, $2.79 against $3.91. On a g6e.xlarge the same placeholder runs from $0.52 against $0.72 when fully busy to $5.17 against $7.24 at 10%.
Two things follow. EC2 is 29% cheaper per token on a 40% pair at every utilisation level, 20% on a 25% pair and 13% on a 15% pair. And falling from 90% to 30% busy triples the cost on either platform, a bigger effect than the platform choice.
Options by situation
You run a few single-GPU endpoints and have no one who owns GPU infrastructure. Take SageMaker real-time hosting. The premium is $221 to $543 a month per instance on the g5 and g6e sizes. Running EC2 instead means maintaining AMIs and drivers, autoscaling, health checks, a load balancer and on-call, and AWS publishes no figure for those hours. Divide your premium by your loaded hourly rate; if the work would take longer than that, SageMaker is cheaper.
Your traffic has long quiet periods and clients can wait a few minutes. Use a SageMaker endpoint built on inference components, which AWS's docs say can scale in to zero instances when the minimum instance count is zero. The catch, in AWS's words: provisioning "takes several minutes," and invocations in that window "will produce an error." Inference components also let several models share one endpoint's GPUs with separate allocations, with no extra line on the price list. Such an endpoint beats an always-on EC2 fleet whenever it is running less than 71% of the hours on a 40% pair, 80% on a 25% pair or 87% on a 15% pair.
Your jobs are batch-shaped. SageMaker Asynchronous Inference can scale to zero between jobs, according to its FAQ, but bills g5 and g6e at the same hourly rates as real-time hosting. EC2 Spot, which AWS sells at what it calls "steep discounts" in exchange for possible interruption, is the cheaper route if your pipeline can retry.
Your traffic is steady and your fleet runs around the clock. Self-host vLLM on EC2 with an Auto Scaling group, billed per second with a 60-second minimum for Linux, and buy an EC2 Instance Savings Plan once the fleet size is stable. On p5.48xlarge the 15% premium is $6,027 per machine per month, more than eight g5.xlarge instances cost on EC2.
You want orchestration without SageMaker's markup. Run vLLM on EKS. AWS's EKS pricing page charges $0.10 per cluster per hour and bills worker nodes through EC2 at EC2 rates, so a GPU fleet pays EC2 prices plus about $73 a month per cluster.
Serverless rules itself out for most LLMs. SageMaker Serverless Inference lists GPUs among its unsupported features and caps memory at 6 GB.
A worked example: four g5.xlarge, always on
Assume one model served on four g5.xlarge instances for all 730 hours of the month, each with a 200 GB volume. On the EC2 side, add one Application Load Balancer at $0.0225 an hour and an assumed average of two load-balancer capacity units at $0.008 each per hour. On the SageMaker side, assume 250 GB of data in and 250 GB out at $0.016 per GB. Storage uses the EBS pricing page's $0.08 per GB-month gp3 example rate and SageMaker's $0.14 per GB-month endpoint storage rate.
| Monthly line | EC2 + vLLM | SageMaker endpoint |
|---|---|---|
| Instances, on demand | $2,938 | $4,111 |
| Storage, 4 x 200 GB | $64 | $112 |
| Load balancer or data processed | $28 | $8 |
| Total before people | $3,030 | $4,231 |
The gap is about $1,201 a month. At an assumed loaded engineering cost of $120 an hour, it pays for about 10 hours of EC2 upkeep a month. On one-year no-upfront plans, EC2 Instance Savings Plans at $1,851 plus the same extras total about $1,943, the SageMaker plan at $3,239 plus extras about $3,359, and the gap of about $1,416 pays for about 12 hours. If running the fleet takes more than that, SageMaker is cheaper; if less, EC2 is.
Now change one assumption: the fleet is needed only 12 hours a day, or 365 hours a month. Per instance, EC2 left on costs $734, SageMaker scaled to zero overnight costs $514, and EC2 scaled down on the same schedule costs $367. Scaling discipline is worth more than the choice of platform.
At the other end, eight always-on p5.48xlarge instances carry a SageMaker premium of $48,216 a month on demand, and $88,595 a month separates the SageMaker plan from EC2 Instance Savings Plans on one-year terms. At that size the premium pays for a team.
A smaller model
Every option above takes the model, and so the GPU size, as given. A compact model trained for one workload shrinks both. Parsec, a small language model lab, offers that as a service: according to its inference page it traces production requests, builds datasets and evaluations the customer approves, post-trains and serves the model, sending low-confidence requests to a closed frontier model. Its "Parsec vs your own GPUs" page says models "run alongside other teams' on an optimized cluster," so there are no instances to size. The page claims 60% savings without a stated baseline, and Parsec publishes no price for the service, so it has no row in the cost comparison above.
Bottom line
Small fleet, no platform team: SageMaker, as long as the premium divided by your hourly rate is fewer hours than EC2 would take. Spiky traffic that tolerates a cold start: a SageMaker inference-component endpoint scaled to zero, or an EC2 group scaled just as hard, which is cheaper still. Steady traffic, several instances or any p4d or p5: vLLM on EC2 or EKS with an EC2 Instance Savings Plan, and Spot for batch. In every case, benchmark your tokens per second and raise utilisation before you commit, because idle GPUs cost more than either platform's markup.
Sources
- AWS Price List, Amazon SageMaker, us-east-1: https://pricing.us-east-1.amazonaws.com/offers/v1.0/aws/AmazonSageMaker/current/us-east-1/index.json
- AWS, EC2 On-Demand price data, us-east-1 Linux: https://b0.p.awsstatic.com/pricing/2.0/meteredUnitMaps/ec2/USD/current/ec2-ondemand-without-sec-sel/US%20East%20(N.%20Virginia)/Linux/index.json
- AWS, Amazon EC2 On-Demand Pricing: https://aws.amazon.com/ec2/pricing/on-demand/
- AWS Price List, Compute and EC2 Instance Savings Plans, us-east-1: https://pricing.us-east-1.amazonaws.com/savingsPlan/v1.0/aws/AWSComputeSavingsPlan/20261118020314/us-east-1/index.json
- AWS Price List, SageMaker Savings Plans, us-east-1: https://pricing.us-east-1.amazonaws.com/savingsPlan/v1.0/aws/AWSMachineLearningSavingsPlans/20260909190755/us-east-1/index.json
- AWS, Amazon SageMaker AI Pricing: https://aws.amazon.com/sagemaker/ai/pricing/
- AWS, Amazon EC2 G5 instances: https://aws.amazon.com/ec2/instance-types/g5/
- AWS, Amazon EC2 G6e instances: https://aws.amazon.com/ec2/instance-types/g6e/
- AWS, Amazon EC2 P4 instances: https://aws.amazon.com/ec2/instance-types/p4/
- AWS, Amazon EC2 P5 instances: https://aws.amazon.com/ec2/instance-types/p5/
- AWS, Spot Instance interruptions: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-interruptions.html
- AWS, LMI container documentation: https://docs.aws.amazon.com/sagemaker/latest/dg/large-model-inference-container-docs.html
- Deep Java Library, Large Model Inference containers: https://docs.djl.ai/master/docs/serving/serving/docs/lmi/index.html
- vLLM, GitHub repository: https://github.com/vllm-project/vllm
- AWS, Scale an endpoint to zero instances: https://docs.aws.amazon.com/sagemaker/latest/dg/endpoint-auto-scaling-zero-instances.html
- AWS, Deploy models for real-time inference (inference components): https://docs.aws.amazon.com/sagemaker/latest/dg/realtime-endpoints-deploy-models.html
- AWS, Amazon SageMaker AI FAQs: https://aws.amazon.com/sagemaker/ai/faqs/
- AWS, SageMaker Serverless Inference: https://docs.aws.amazon.com/sagemaker/latest/dg/serverless-endpoints.html
- AWS, Amazon EBS pricing: https://aws.amazon.com/ebs/pricing/
- AWS, Elastic Load Balancing pricing: https://aws.amazon.com/elasticloadbalancing/pricing/
- AWS, Amazon EKS pricing: https://aws.amazon.com/eks/pricing/
- Parsec, Inference: https://parseclab.ai/inference/
- Parsec vs your own GPUs: https://parseclab.ai/compare/own-gpus/