By Fatskills Exam Guides Team — the exam nerds behind 28,500+ quizzes and 2.1M practice questions across 500+ global exams.
Service limits and quotas in AWS are hard boundaries (e.g., max instances, API calls, or storage partitions) that can break your ML pipeline if ignored. For example: - A real-time fraud detection system using SageMaker endpoints hits a concurrent instance limit, causing throttling during Black Friday traffic.- A batch inference job fails because the S3 bucket exceeds 5,000 GET requests per second per prefix, stalling feature retrieval.- A distributed training job crashes because the team didn’t request a quota increase for ml.p4d.24xlarge instances, which are capped at 2 per account by default.
ml.p4d.24xlarge
Understanding these limits ensures your ML workloads scale without surprises.
SageMaker Instance Quotas: AWS-imposed limits on the number of concurrent instances (e.g., ml.m5.2xlarge = 20 per account by default). Request increases via AWS Service Quotas console. Why it matters: Training jobs fail if you exceed the limit, even if your code is correct.
ml.m5.2xlarge
S3 Request Rate Limits:
s3://bucket/prefix/
3,500 PUT/COPY/POST/DELETE requests per second per prefix. Workaround: Distribute objects across prefixes (e.g., s3://bucket/2023-01-01/, s3://bucket/2023-01-02/).
s3://bucket/2023-01-01/
s3://bucket/2023-01-02/
SageMaker Endpoint Concurrency Limits:
Hard limit: 200 concurrent invocations per endpoint (after quota increase). Use case: Auto-scaling endpoints for high-traffic inference (e.g., recommendation engines).
SageMaker Training Job Limits:
Max 100 GB input data per training job (unless using Pipe Mode to stream from S3). Workaround: Use SageMaker Pipelines to orchestrate sequential jobs.
S3 Partitioning (Prefix Design):
s3://bucket/data/year=2023/month=01/
Partitioning improves query performance in Athena, Glue, and SageMaker Feature Store by reducing the data scanned. Example: A feature store with 1B records partitioned by user_id and date speeds up training data retrieval.
user_id
date
SageMaker Notebook Instance Limits:
Max volume size: 16 TB (EBS gp3). Trap: Notebooks are not for production inference—use SageMaker Endpoints instead.
SageMaker Processing Job Limits:
Max 100 GB input data per job (unless using distributed processing with ml.m5.24xlarge). Use case: Preprocessing large datasets (e.g., 100M rows) before training.
ml.m5.24xlarge
S3 Transfer Acceleration Limits:
No request rate limits, but costs extra ($0.04/GB for transfers > 1 GB). Use case: Speeding up global data uploads (e.g., training data from EU to US).
SageMaker Ground Truth Limits:
Max 10 concurrent labeling jobs per account. Workaround: Use private workforce for large-scale labeling.
SageMaker Feature Store Online Store Limits:
OnlineStore
Scenario: You need to train a distributed PyTorch model on 8 ml.p4d.24xlarge instances, but the default quota is 2.Steps:1. Check current quotas: - Go to AWS Service Quotas console → Search for "SageMaker" → Filter for ml.p4d.24xlarge. - Note the applied quota value (e.g., 2).2. Request a quota increase: - Click "Request quota increase" → Enter the new value (e.g., 10) → Submit. - AWS typically approves within 24 hours (or immediately for small increases).3. Verify the increase: - After approval, confirm the new quota in the console. - Run your training job with instance_count=8.
instance_count=8
Scenario: Your batch inference job fails because it exceeds 5,000 GET requests/sec on a single S3 prefix.Steps:1. Analyze the prefix bottleneck: - Use S3 Server Access Logs or CloudWatch Metrics (GetRequests, 4xxErrors) to identify hot prefixes.2. Redesign the prefix structure: - Bad: s3://bucket/data/ (all objects in one prefix). - Good: s3://bucket/data/year=2023/month=01/day=01/ (distributed across 365+ prefixes).3. Use S3 List API efficiently: - Instead of list_objects_v2() (slow for large buckets), use S3 Inventory or Glue Crawlers to catalog objects.4. Test with S3 Benchmarking Tools: - Use AWS S3 Performance Tool (s3-benchmark) to simulate load and verify improvements.
GetRequests
4xxErrors
s3://bucket/data/
s3://bucket/data/year=2023/month=01/day=01/
list_objects_v2()
s3-benchmark
Scenario: Your real-time recommendation endpoint throttles during peak traffic (1,000 RPS).Steps:1. Check current concurrency limits: - Go to SageMaker → Endpoints → [Your Endpoint] → Monitoring → Invocations. - Look for ThrottledRequests in CloudWatch.2. Increase endpoint concurrency: - Option 1: Request a quota increase (up to 200 concurrent invocations). - Option 2: Enable auto-scaling (recommended): - Set min capacity = 2, max capacity = 20. - Use CloudWatch Alarms (e.g., CPUUtilization > 70% for 5 minutes → scale out).3. Optimize endpoint configuration: - Use ml.m5.2xlarge for low-latency inference (vs. ml.c5.xlarge for cost savings). - Enable data capture to log requests/responses for debugging.
ThrottledRequests
CPUUtilization > 70%
ml.c5.xlarge
s3://bucket/data/year=2023/
NoSuchKey
Trick: The exam may ask, "Which instance is best for distributed training of a 100M-parameter PyTorch model?"
ml.trn1.32xlarge
S3 Partitioning for Performance:
Scenario: "A Glue job scans 10 TB of data daily. How can you reduce costs?"
SageMaker Endpoint Scaling:
Scenario: "A fraud detection endpoint gets 10,000 RPS. What’s the most cost-effective solution?"
ml.c5.4xlarge
Quota Increase Workflow:
ResourceLimitExceeded
A data science team is training a distributed XGBoost model on 50 GB of data. The job fails with ResourceLimitExceeded. What’s the most likely cause? Answer: The team hit the default SageMaker training job concurrency limit (20 jobs) or the instance quota limit (e.g., only 2 ml.m5.2xlarge allowed).Explanation: Always check Service Quotas before launching large jobs.
A batch inference job reads 1M files from s3://bucket/data/ and fails with SlowDown errors. What’s the fastest fix? Answer: Distribute files across multiple prefixes (e.g., s3://bucket/data/part-0001/, s3://bucket/data/part-0002/).Explanation: S3 has a 5,000 RPS limit per prefix; partitioning avoids throttling.
SlowDown
s3://bucket/data/part-0001/
s3://bucket/data/part-0002/
A real-time recommendation endpoint gets 1,000 requests per second but throttles after 500 RPS. What’s the issue? Answer: The endpoint’s default concurrency limit is 5 (soft limit). Request a quota increase or enable auto-scaling.Explanation: SageMaker endpoints have hard and soft limits; auto-scaling is the best long-term fix.
ml.g5.2xlarge
Join 4M+ learners. Unlock unlimited quizzes, wrong-answer tracking, flashcards + reminders, study guides, and 1-on-1 challenges.