SageMaker "ResourceLimitExceeded: The Account-Level Service Limit Is 0 Instances": Which Quota to Request (Endpoint, Training, Notebook, Studio), How to Ask, and What Runs While You Wait

Logeshwaran
—

ResourceLimitExceeded: The account-level service limit 'ml.g5.xlarge for endpoint usage' is 0 Instances, with current utilization of 0 Instances and a request delta of 1 Instances. means your AWS account is allowed to run zero of that instance type for that kind of SageMaker job, and you asked for one. The fix is a quota increase, requested in Service Quotas under the exact name in the message, and nothing you change in your code will get around it. Here is the part that surprises people on their first day: the zero isn't special to GPUs. In a new account, even ml.m5.xlarge for endpoint usage starts at 0, which is why the free-tier XGBoost tutorial fails on its deploy step, while notebooks on ml.t3.medium start at 6 and work at once. This page decodes the quota names (endpoint, training job, notebook instance, Studio app, spot, cluster), shows the console and CLI request, suggests what to write, and lists what runs today while you wait: Serverless Inference, a smaller instance, or Bedrock.

Ethan, a developer, trained a small model that reads Jake's phone-repair tickets and predicts which ones will need a part ordered. Training in a Studio notebook went fine. Deploying it as an endpoint on an ml.g5.xlarge died on this error. He tried ml.m5.xlarge instead, and got the same message with a different name in it. Jake asked whether AWS had blocked the account. It hadn't; it just hadn't been asked.

⚡ Quick Answer

• Which quota: the exact string in the quotes of the error, for example ml.g5.xlarge for endpoint usage. Endpoints, training jobs, notebook instances and Studio apps each have their own. The name decoder.

• Request it: Service Quotas → AWS services → Amazon SageMaker → search the name → Request increase at account level. Or aws service-quotas request-service-quota-increase --service-code sagemaker --quota-code L-XXXXXXXX --desired-value 1. Steps and CLI.

• While you wait: Serverless Inference (CPU, up to 6 GB, no instance quota), a CPU instance type you already have, or Bedrock for a hosted model. Options.

Quotas are per Region. A quota approved in us-east-1 does nothing in eu-west-1.

What the error means, in plain English

Every AWS account carries a set of service quotas: ceilings on how much of each thing you may run in each Region. SageMaker's quotas are unusually fine-grained. There isn't one number for "GPU instances"; there is one number for every instance type, multiplied by every kind of work it can do: hosting an endpoint, running a training job, running a spot training job, powering a notebook instance, a Studio app, a processing job, a transform job, a HyperPod cluster, a warm pool. In a fresh account, most of those numbers are 0, and that includes the ordinary CPU sizes for endpoints and training jobs. A few have small defaults so a tutorial can start: notebooks on ml.t3.medium get 6, notebooks and Studio apps on ml.m5.xlarge get 1, spot training on ml.c5.xlarge or ml.m5.xlarge gets 4.

So the message is precise, and it's worth reading all of it:

An error occurred (ResourceLimitExceeded) when calling the CreateEndpoint operation:
The account-level service limit 'ml.g5.xlarge for endpoint usage' is 0 Instances,
with current utilization of 0 Instances and a request delta of 1 Instances.
Please use AWS Service Quotas to request an increase for this quota.

Three facts are in there. Which operation hit the ceiling (CreateEndpoint, CreateTrainingJob, CreateNotebookInstance, CreateApp). Which quota, by its exact name, which is also exactly what you search for in Service Quotas. And the arithmetic: the limit is 0, you're using 0, you asked for 1. When the limit is 2 and utilization is 2, the same error means something you forgot to delete is still holding the slots, and the fix is cleanup rather than a request.

Jake: "Zero. Did they decide I'm not allowed to use it?"

Ethan: "Everyone starts at zero for most of these. It's a brake on accidents: nobody wakes up to a bill for eight GPUs they launched by mistake. You ask once, they raise it, and it stays raised."

Check your quotas before you hit the error

You can read every SageMaker quota for a Region in one call, and it's worth doing once per account so the zeros stop surprising you. This lists the quotas that are above zero, which is the shortest answer to "what can I run right now":

aws service-quotas list-service-quotas --service-code sagemaker --max-items 2000 \
  --query "Quotas[?Value > \`0\`].{Name:QuotaName,Value:Value}" --output table

And this reads one quota's applied value, which is the number the error compares against:

aws service-quotas get-service-quota --service-code sagemaker --quota-code L-XXXXXXXX \
  --query "Quota.{Name:QuotaName,Applied:Value}"

In the console the same list is under Service Quotas, Amazon SageMaker, sorted by applied quota value. A new account shows a long column of zeros with a handful of small numbers for the notebook and Studio sizes; that column is the map of what you'll need to request as the project grows, and a five-minute read of it saves a day of waiting later.

The quota-name decoder: which one you actually need

The name in the error tells you which quota to request, and asking for the wrong one is the most common way to wait twice. The pattern is <instance type> for <kind of work> usage, and these are the kinds:

You ranQuota name patternExampleTypical new-account default
CreateEndpoint, model.deploy(), JumpStart Deployml.X for endpoint usageml.g5.xlarge for endpoint usage0 (also 0 for ml.m5.xlarge and ml.c5.xlarge)
CreateTrainingJob, estimator.fit()ml.X for training job usageml.g5.2xlarge for training job usage0
A training job with use_spot_instances=Trueml.X for spot training job usageml.m5.xlarge for spot training job usage4 for ml.m5.xlarge and ml.c5.xlarge; 0 for GPUs
Classic notebook instancesml.X for notebook instance usageml.t3.medium for notebook instance usage6 for ml.t3.medium, 1 for ml.m5.xlarge, 0 for GPUs
Studio JupyterLab spaceStudio JupyterLab Apps running on ml.X instancesStudio JupyterLab Apps running on ml.g5.xlarge instances6 for ml.t3.medium, 1 for ml.m5.xlarge, 0 for GPUs
Studio Code Editor spaceStudio CodeEditor Apps running on ml.X instancesStudio CodeEditor Apps running on ml.g6.xlarge instancesSame shape as JupyterLab
Processing or batch transform jobml.X for processing job usage, ml.X for transform job usageml.g5.xlarge for transform job usage0
HyperPod cluster, warm poolml.X for cluster usage, ml.X for training warm pool usageml.g5.xlarge for cluster usage0

Two more ceilings sit beside the per-type ones and bite later: Maximum number of instances per endpoint (default 4) and Maximum number of instances per training job (default 20), plus Maximum number of running Studio apps allowed per account (default 40). If your deploy asks for five instances behind one endpoint, you need both the per-type quota raised to at least 5 and the per-endpoint quota raised.

Notice what the table says about the free-tier tutorial. A notebook on ml.t3.medium starts at 6, so the training notebook opens. Training on ml.m5.xlarge as a spot job starts at 4, so a spot-enabled training run works. But deploying to ml.m5.xlarge for endpoint usage starts at 0, which is the step that fails for almost everyone following the XGBoost walkthrough in a new account. The request for that one quota is the real last step of the tutorial.

Request the increase: console and CLI

In the console

  1. Open Service Quotas in the AWS console (not the SageMaker console), and switch to the Region where the error happened.
  2. Choose AWS services, search for Amazon SageMaker, open it.
  3. In the search box, paste the exact name from the error, such as ml.g5.xlarge for endpoint usage.
  4. Select it, choose Request increase at account level, enter the number of instances you want (1 or 2 for a first endpoint), and submit.
  5. Watch the request under Quota request history. It shows Pending, then Quota requested or Approved, and the applied value on the quota page changes when it lands. The console makes no promise about how long that takes, which is the honest reason to file the request before the day you need it.

From the CLI

Service Quotas needs the quota's code, not its name, so look the code up first. The service code for SageMaker is sagemaker:

# find the quota code by its name
aws service-quotas list-service-quotas --service-code sagemaker \
  --query "Quotas[?QuotaName=='ml.g5.xlarge for endpoint usage'].{Name:QuotaName,Code:QuotaCode,Applied:Value}" \
  --output table

# ask for 2 instances
aws service-quotas request-service-quota-increase \
  --service-code sagemaker \
  --quota-code L-XXXXXXXX \
  --desired-value 2

# follow the request
aws service-quotas list-requested-service-quota-change-history-by-quota \
  --service-code sagemaker --quota-code L-XXXXXXXX \
  --query "RequestedQuotas[].{Status:Status,Wanted:DesiredValue,When:Created}"

The list-service-quotas call pages; if the name you want isn't in the first page, add --max-items 1000 or filter with contains(QuotaName, 'g5.xlarge'). If the quota is not adjustable through Service Quotas in your Region, or the request is denied, the fallback is a case in Support Center under Service limit increase, with the same three facts: Region, quota name, desired value.

What to write in the request

Most requests for one or two instances of a common type are approved without a conversation. Larger GPU requests get read by a person, and a short, specific note helps:

  • The exact quota name and the Region.
  • The number you want and why it is that number (one endpoint with two instances for a blue/green deploy; a training job that needs four GPUs for a day).
  • What the workload is in one sentence, and whether it's development or production.
  • That you understand the hourly cost; mentioning a billing alarm already set does no harm.

Jake: "Do I have to justify a single small GPU to a human being?"

Ethan: "Usually not; small ones are often approved by the system. The note is for the day you ask for eight of something big. Write it once, keep it, reuse it."

What to use while you wait

The request can land in minutes or sit for a day, and neither is in your control. These three paths run today in an account that has not asked for anything yet.

Serverless Inference

A serverless endpoint has no instance type, so there is no ml.X for endpoint usage quota to hit. Its own quotas start above zero: 5 serverless endpoints and a total concurrency of 10 across them, by default. It runs on CPU with a memory size you choose from 1 GB to 6 GB, scales to zero between requests (so you pay for compute by the millisecond and nothing while idle), and has cold starts of a few seconds when it wakes. For a model that reads a ticket and returns a label, it's the right first deployment anyway:

from sagemaker.serverless import ServerlessInferenceConfig

predictor = model.deploy(
    serverless_inference_config=ServerlessInferenceConfig(
        memory_size_in_mb=4096,
        max_concurrency=5,
    ),
    endpoint_name="ticket-parts-serverless",
)

What it can't do: GPUs, and a few container features; a model that needs CUDA still needs the instance quota.

A type you already have

Run list-service-quotas and look at what is above zero. Spot training on ml.m5.xlarge and ml.c5.xlarge starts at 4, so a CPU training job with use_spot_instances=True runs while the on-demand quota request is pending. Notebooks and Studio apps on ml.t3.medium and ml.m5.xlarge are open. For endpoints, there is no CPU size that starts above zero in a new account, so Serverless Inference is the path for a first endpoint.

Bedrock, if the model is a hosted one

If what you wanted the GPU for is a foundation model that Bedrock already serves, Bedrock has no instance quota at all; you pay per token and call it today. That doesn't help for your own trained model, but it's the right answer more often than people expect, and our Bedrock vs SageMaker guide draws the line. The one SageMaker case Bedrock can't replace is exactly Ethan's: a small custom model, which is what Serverless Inference is for.

The worked example: Ethan's endpoint

Ethan's error named ml.g5.xlarge for endpoint usage. His retry on ml.m5.xlarge named that quota instead, which told him the account had not yet been opened for endpoints of any kind. He filed two requests in Service Quotas, one for each name, desired value 1, with a one-line note: "Single-instance endpoint for a small classification model, development, us-east-1." Then he deployed the same model to Serverless Inference with 2 GB of memory, which took three minutes and has handled the shop's ticket volume ever since. The ml.m5.xlarge approval arrived the same afternoon; the GPU one took longer. He hasn't needed either: the serverless endpoint costs the shop almost nothing between tickets, and the GPU quota sits there, raised, for the day the model grows.

Jake: "So we asked for a GPU, got told no, and the thing that fixed it cost less than the GPU would have?"

Ethan: "The zero made us think about whether we needed it. That's what the zero is for."

The same error on training jobs, notebooks and Studio

Training jobs read ml.X for training job usage, or spot training job usage when you ask for spot, and the request is identical. Two habits save you a second round trip. Count instances, not jobs: instance_count=2 needs the quota at 2 or more. And remember that a hyperparameter tuning job runs several training jobs at once, so its parallelism multiplies the instances you need.

Notebook instances read ml.X for notebook instance usage; Studio spaces read Studio JupyterLab Apps running on ml.X instances or the Code Editor equivalent, and the error arrives when you try to start the space on a GPU size. The free sizes, ml.t3.medium at 6 and ml.m5.xlarge at 1, are enough to write and test code; request the GPU size for the space only if you actually train inside the notebook rather than in a training job, which is the cheaper habit anyway.

One more quota that looks like this error and isn't: ResourceLimitExceeded on CreateApp with "running Studio apps" means you've hit the account-wide count of 40 running apps, usually because stopped-but-not-deleted spaces are still counted; shut old spaces down before requesting more.

What a raised quota changes, and what it doesn't

A quota is a ceiling, not a purchase. Raising ml.g5.xlarge for endpoint usage to 2 costs nothing by itself and starts no instance; the bill begins when you create the endpoint and runs for every hour it exists, busy or idle. That is the real reason to pair every quota request with two habits. Delete endpoints you're not using, because an idle endpoint on a GPU instance is the most common surprise on a SageMaker bill, and set a billing alarm before the first GPU endpoint goes up; our three-layer billing alerts guide is the setup we use. The quota, once raised, stays raised across projects, so the request is a one-time task per instance type per Region.

When the request is approved and the error stays

What you seeWhyFix
Approved in the console, same errorApproved in a different RegionCheck the Region in the error and in Service Quotas; request again there
Approved, error names a different kind of workYou raised endpoint usage but the job is a training job (or spot, or Studio app)Request the quota with the exact name in the message
Limit is 2, utilization is 2Old endpoints or jobs still hold the slotsaws sagemaker list-endpoints, delete what you no longer use
Per-type quota is fine, still fails with 5 instancesMaximum number of instances per endpoint (default 4)Request that quota too
Request denied or stuck at Pending for daysLarge GPU ask, new account, or a Region without capacityAsk for a smaller number first, or open a Support Center case with the same details
Error on a JumpStart deploy for a big modelThe model card's instance (for example ml.p5e.48xlarge) starts at 0 and is reviewed by a personFile early; meanwhile evaluate through Bedrock or a smaller model

Frequently asked questions about SageMaker ResourceLimitExceeded

What does SageMaker ResourceLimitExceeded mean?

Your account's quota for that instance type and kind of work (endpoint, training job, notebook, Studio app) is lower than what you asked for. In a new account most of those quotas are 0. Request an increase in Service Quotas.

Why is the SageMaker service limit 0 instances?

New accounts start at 0 for most SageMaker instance quotas, including common CPU sizes for endpoints and training jobs, as a guard against accidental spend. A few sizes have small defaults, such as 6 ml.t3.medium notebooks.

Which SageMaker quota do I request?

The exact name quoted in the error, for example ml.g5.xlarge for endpoint usage. Endpoints, training jobs, spot training, notebook instances and Studio apps each have a separate quota per instance type.

How do I request a SageMaker quota increase?

Service Quotas console, AWS services, Amazon SageMaker, search the quota name, Request increase at account level. Or aws service-quotas request-service-quota-increase --service-code sagemaker --quota-code CODE --desired-value N.

How do I find the SageMaker quota code for the CLI?

aws service-quotas list-service-quotas --service-code sagemaker with a query on QuotaName returns the QuotaCode (an L- value) for the name in your error.

How long does a SageMaker quota increase take?

Small requests for common types are often approved automatically; GPU and large requests are reviewed and can take longer. The console shows the request as Pending until it is applied and gives no promised time.

Why does the free-tier XGBoost tutorial fail at deploy?

The notebook and spot training have small default quotas, but ml.m5.xlarge for endpoint usage starts at 0 in a new account. Request that quota, or deploy with Serverless Inference.

Does Serverless Inference need an instance quota?

No. Serverless endpoints have no instance type; their own defaults are 5 endpoints and 10 total concurrency. They run on CPU with up to 6 GB of memory.

What is the ml.g5.xlarge for endpoint usage quota?

The number of ml.g5.xlarge instances your account may run behind SageMaker endpoints in one Region. It starts at 0 and must be requested before the first GPU endpoint.

Are SageMaker quotas per Region?

Yes. Every instance quota is per Region, so an increase in us-east-1 does not apply in eu-west-1.

What is Maximum number of instances per endpoint?

A separate quota, default 4, that caps how many instances one endpoint can have regardless of the per-type quota.

Why do I get ResourceLimitExceeded when the quota is not 0?

Utilization already equals the limit: endpoints or jobs you forgot still hold the slots. List and delete them, or request a higher value.

What quota does a SageMaker Studio GPU space need?

Studio JupyterLab Apps running on ml.X instances (or the Code Editor equivalent) for that size. GPU sizes start at 0; ml.t3.medium starts at 6 and ml.m5.xlarge at 1.

Can I use Bedrock instead of requesting a SageMaker quota?

If you need a hosted foundation model, yes: Bedrock has no instance quota and bills per token. For your own trained model, use Serverless Inference while the quota request is pending.

Does a spot training job use a different quota?

Yes: ml.X for spot training job usage, which starts at 4 for ml.m5.xlarge and ml.c5.xlarge in a new account, so a CPU spot job can run before any request.

What should I write in a SageMaker quota request?

The quota name, the Region, the number of instances, the workload in one sentence, and whether it is development or production.

For readers preparing for an AWS certification

We have been covering AWS certifications alongside our fixes, so here is a short extra for readers studying for one. If you only came for the fix, you already have it; feel free to skip this part.

Exams that test this topic: Machine Learning Engineer – Associate (MLA-C02) • AI Practitioner (AIF-C01) • CloudOps Engineer – Associate (SOA-C03).

Here are the exam-style questions this topic tends to raise, with the reasoning you need to answer them:

1. A training job fails with ResourceLimitExceeded for an instance type. What do you do?

Request a higher quota for that instance type's training usage in Service Quotas.

2. Training cost must drop and interruptions are acceptable. What do you use?

Managed spot training, with checkpoints so jobs can resume.

3. An endpoint gets traffic only a few times a day. Which inference option fits?

Serverless inference, which scales to zero between requests.

4. Requests carry large payloads and can take minutes to process. Which inference option fits?

Asynchronous inference.

5. You need predictions for a whole dataset in S3, with no endpoint. What do you use?

Batch transform.

6. How do you get warned before a quota runs out?

Service Quotas usage with a CloudWatch alarm on the quota.

Exam codes and dates change often. Our AWS certification changes page keeps track of what is current.

Ethan's two requests are approved and unused, and the serverless endpoint answers Jake's tickets for a few cents a month. Jake's verdict: "So the computer said no, and the right answer was a cheaper yes." Ethan said the zero had done its job.

📌 If you keep one line from this page

Request the quota with the exact name in the error, in the Region of the error, in Service Quotas; new accounts start at 0 even for CPU endpoints, so deploy to Serverless Inference while you wait.

ml.X for endpoint / training job / spot training job / notebook instance usage · Studio JupyterLab Apps running on ml.X · per endpoint max 4 · serverless: 5 endpoints, 10 concurrency.

Revision note. Written October 15, 2026, from the SageMaker quota table as it stands, with the Studio app quota names and the Serverless Inference defaults in place. "Ask, and it shall be given," goes the old line; with SageMaker quotas, that is the whole procedure.

Related