All cheat sheets
Serverless & AIcheat sheet

SageMaker Inference Recommender

Cost-per-inference — not cost-per-hour — decides what a SageMaker endpoint really costs. Inference Recommender benchmarks your model across instance families, ranks them by dollars-per-10K, and routinely surfaces an Inferentia win worth half the bill.

Last reviewed: July 14, 2026

TL;DR: SageMaker offers 50+ instance types to deploy a model on, and most teams pick one from a blog post, then never revisit it — the endpoint works, it's just twice the size it needs. Inference Recommender automates the answer: hand it your model artifact, container, and a realistic sample payload; it spins up candidate instances, pushes traffic, and ranks them by cost per inference. The benchmark costs ~$10–20 in temporary instance time and the savings compound for as long as the endpoint runs.

The numbers

  • Cost-per-hour is the input cost; cost-per-inference is the output cost. A $0.10/hr instance doing 20 inf/s is more expensive per inference than a $0.40/hr instance doing 100 inf/s (throughput swings usually beat price swings).
  • Inferentia is the recurring headline: a typical BERT deployment ran ml.g4dn.xlarge (T4 GPU) at $0.736/hr vs ml.inf1.xlarge at $0.362/hr — same throughput/latency, half the price. One team saved $3,200/mo on a single endpoint.
  • Two modes: Instance Recommendation (auto-picks candidates, ~45 min) for first-time picks; Load Test (you specify instance types, traffic pattern, latency SLA, a few hours) before locking a high-volume endpoint.
  • Field examples: a ResNet-50 image tagger swapped g4dn→inf1 for $3,200/yr off one endpoint; a BERT QA model on m5.2xlarge found inf1 41% cheaper per inference, saving ~$140/mo.

Do this

  1. Register the model — S3 artifact + inference container image.
  2. Build a realistic sample payload — production-shaped data, not a 1KB toy JSON (garbage in, irrelevant recommendation out).
  3. Launch a job: Instance Recommendation for a fast first pick; Load Test with your real CloudWatch traffic pattern + latency SLA before high-volume commit. Include your current instance as the baseline so the report shows the dollar delta directly.
  4. Always include Inferentia (inf1/inf2) in the candidate list — even when the model "sounds GPU-shaped." The tool tells you fast if it doesn't compile.
  5. Benchmark the autoscale minimum — the base instance runs 24/7, so optimize it first. Re-run when traffic 2×'s, the SLA tightens, or the model architecture changes.

Gotchas

  • The cheapest instance is usually the expensive deployment — chasing the lowest $/hr ignores throughput and overpays per inference.
  • Report dollars are a snapshot — AWS prices drift and the math uses on-demand (not Spot) rates, so numbers are conservative; the ranking between instances is far more durable than the absolute prices.
  • Inferentia isn't universal — very large LLMs, custom CUDA ops, and some vision models don't compile cleanly; benchmark rather than assume.
  • Realistic payloads matter — a toy input tells you nothing about how the model handles real 50KB requests.

Skip this if

  • You serve models off SageMaker (EKS, Lambda, raw EC2) — the cost-per-inference logic still holds, but you'll roll your own benchmarks.
  • Traffic is truly sporadic (a few hundred req/hr, then silence) — scale-to-zero usually wins; see SageMaker Serverless Inference.
  • You're hosting many small models on shared infra — see SageMaker Multi-Model Endpoints.

Run this audit with your AI assistant

Paste this into Claude, ChatGPT, or any agent that can run the AWS CLI with read-only credentials. It audits your account for exactly the waste this sheet describes — and changes nothing.

You are auditing an AWS account's SageMaker real-time inference
endpoints for instance-selection savings. Use the AWS CLI with
READ-ONLY credentials. Do not create, modify, or delete anything —
report findings and recommended (unapplied) fixes only.

1. Inventory: aws sagemaker list-endpoints, then describe-endpoint and
   describe-endpoint-config — capture instance type, instance count,
   and model family per production variant.
2. Cost-per-inference math: for each endpoint pull CloudWatch
   AWS/SageMaker Invocations (Sum) and the instance $/hr; compute
   current $ per 10K inferences. This is the metric that matters, not
   $/hr — a cheaper hourly rate with lower throughput can cost MORE per
   inference.
3. Candidate list to recommend benchmarking: for each endpoint suggest
   testing across families — general (m5/m6i), compute (c5/c6i), GPU
   (g4dn) AND Inferentia (inf1/inf2). Flag any BERT-class NLP or
   ResNet-class vision endpoint currently on GPU/general that has never
   tested Inferentia (common ~40–50% win).
4. Autoscaling note: identify the base (always-on) instance behind any
   autoscaling endpoint — that's the one to optimize first.

Report a table: endpoint | model family | current instance | est. $ per
10K now | families to benchmark | Inferentia untested? | est. savings
if a better instance wins. Recommend running Inference Recommender
(Instance Recommendation ~45 min, or Load Test for high-volume) — but
do NOT launch jobs or change endpoints. Change nothing.
Works with any assistant that can run shell commands.

Want the guided version?

The SageMaker Inference Recommender walkthrough covers this topic interactively — it asks about your setup, branches to what’s relevant, and quizzes you on the tricky parts. Free and anonymous.

Start the walkthrough