AWS Service Quotas
Every AWS service caps how much of it one account can use in one region — 1000 concurrent Lambda executions, so many VPCs, so many API calls per second. Those caps used to be called service limits; Service Quotas is the single console that shows all of them, lets you request an increase without opening a Support case, and — the part that actually saves you — puts a CloudWatch alarm on usage so you find out at 90%, not at 100%.
Mỗi service AWS đều giới hạn mức một account dùng được trong một region — 1000 Lambda chạy đồng thời, bấy nhiêu VPC, bấy nhiêu API call mỗi giây. Trước đây gọi là service limit; Service Quotas là console duy nhất hiển thị tất cả, cho phép xin nâng giới hạn mà không cần mở Support case, và — phần thực sự cứu bạn — đặt CloudWatch alarm lên mức sử dụng để bạn biết ở 90%, chứ không phải ở 100%.
Reach for it / not the right toolKhi nào dùng / khi nào không
Reach for Service QuotasChọn Service Quotas
- A launch or a load test is coming and you need a quota raised in advance.Sắp launch hoặc load test và cần nâng quota trước.
- "Notify us before we hit the limit" — that is a CloudWatch alarm created from this console."Báo cho tụi mình trước khi chạm giới hạn" — chính là CloudWatch alarm tạo từ console này.
- Every new account in the org must start with higher limits — quota request template.Mọi account mới trong org phải có sẵn giới hạn cao hơn — dùng quota request template.
- Auditing "what are our current limits and how close are we?" across services in one place.Rà soát "giới hạn hiện tại là bao nhiêu và đang gần tới đâu?" cho mọi service ở một chỗ.
Not the right toolKhông phải chỗ dùng
- Capping spend. A quota limits how much you can use, not how much you pay — that's AWS Budgets.Chặn chi tiêu. Quota giới hạn mức bạn có thể dùng, không phải mức bạn trả — cái đó là AWS Budgets.
- Blocking an action by policy — that's an SCP or an IAM policy, not a quota.Chặn hành động bằng chính sách — đó là SCP hoặc IAM policy, không phải quota.
- Non-adjustable quotas — no amount of requesting moves them; the answer is architecture (more accounts, more regions, sharding).Quota non-adjustable — xin cỡ nào cũng không nhúc nhích; lời giải là kiến trúc (thêm account, thêm region, chia shard).
- Per-request rate limiting of your own API — that's API Gateway usage plans and throttling.Giới hạn tốc độ cho API của chính bạn — đó là usage plan và throttling của API Gateway.
Alarm at 90%, not at 100%Cảnh báo ở 90%, không phải 100%
Hitting a quota does not produce a helpful message. It produces throttling or a LimitExceededException in the middle of traffic, and someone spends an hour thinking the app is broken. The fix is boring and one-time: create the alarm while things are calm.
Chạm quota không cho ra thông báo tử tế. Nó cho ra throttling hoặc LimitExceededException ngay giữa lúc có traffic, rồi ai đó mất một tiếng tưởng app hỏng. Cách chữa thì nhàm và chỉ làm một lần: tạo alarm khi mọi thứ còn yên.
The alarm watches a real usage metric against the quota value, so it keeps working after the quota is raised — the threshold is what you pick, not something AWS moves for you.
Alarm theo dõi metric sử dụng thật so với giá trị quota, nên vẫn chạy sau khi quota được nâng — ngưỡng là do bạn chọn, AWS không tự dời giúp.
Adjustable, non-adjustable, and templatesAdjustable, non-adjustable và template
Before promising anyone a higher limit, check which kind it is. Half of "we'll just raise it" conversations die on a quota that cannot be raised. Trước khi hứa với ai là sẽ nâng giới hạn, hãy xem nó thuộc loại nào. Phân nửa câu "nâng lên là xong" chết ngay ở một quota không thể nâng.
Service Quotas vs Trusted Advisor vs a Support caseService Quotas, Trusted Advisor và Support case
Three things touch limits and only one of them changes them. Trusted Advisor watches, Support used to be the door, Service Quotas is the door now. Ba thứ đều dính tới limit nhưng chỉ một thứ thay đổi được. Trusted Advisor chỉ quan sát, Support từng là cánh cửa, giờ cánh cửa là Service Quotas.
| Service Quotas | Trusted Advisor | |
|---|---|---|
| What it doesLàm gì | views and raises quotas across all servicesxem và nâng quota trên mọi service | monitors only — its Service Limits checks flag when you pass ~80% of a limitchỉ giám sát — mục Service Limits cảnh báo khi bạn vượt ~80% giới hạn |
| Can it change a limit?Có đổi được giới hạn không? | Yes — that's the whole pointCó — đó là toàn bộ lý do nó tồn tại | No. It reports and links out; it never raises anythingKhông. Nó báo cáo và dẫn link ra ngoài; không bao giờ tự nâng |
| CoveragePhạm vi | most AWS services, all quotas listedhầu hết service AWS, liệt kê mọi quota | a curated subset of limits onlychỉ một nhóm limit được chọn lọc |
| AlertingCảnh báo | CloudWatch alarm at your threshold, per quotaCloudWatch alarm ở ngưỡng bạn chọn, cho từng quota | weekly digest, or a CloudWatch Events / EventBridge rule on the check statusbản tóm tắt hàng tuần, hoặc rule CloudWatch Events / EventBridge trên trạng thái check |
Things that catch you outNhững chỗ dễ vấp
-
The error never says "quota". You get
ThrottlingException,LimitExceededException,TooManyRequestsException, or an EC2 launch that quietly returns nothing. First reflex on a weird production ceiling: open Service Quotas and compare applied value to current usage. Lỗi không bao giờ nói chữ "quota". Bạn nhậnThrottlingException,LimitExceededException,TooManyRequestsException, hoặc một lệnh launch EC2 im lặng không ra gì. Phản xạ đầu tiên khi gặp trần lạ trên production: mở Service Quotas và so applied value với mức đang dùng. -
Per region. The team raised the limit in
us-east-1, the failover region is still on defaults, and the failover is exactly when you need the headroom. Raise it in every region you actually run in. Theo từng region. Team nâng limit ởus-east-1, region failover vẫn ở mức mặc định, mà failover lại đúng lúc bạn cần dư địa. Hãy nâng ở mọi region bạn thực sự chạy. - Not all quotas have a usage metric. The alarm option only appears for quotas AWS publishes usage for. For the rest you get the limit value but no gauge — so you have to instrument it yourself. Không phải quota nào cũng có metric sử dụng. Tuỳ chọn tạo alarm chỉ hiện với những quota mà AWS có công bố mức dùng. Số còn lại bạn chỉ thấy giá trị giới hạn chứ không có đồng hồ đo — nên phải tự đo lấy.
- An approved increase is a ceiling, not a reservation. Raising Lambda concurrency to 5000 does not guarantee capacity or reserve anything; it only stops AWS from refusing you at 1000. Yêu cầu được duyệt là trần mới, không phải chỗ đã đặt trước. Nâng Lambda concurrency lên 5000 không đảm bảo có capacity hay giữ chỗ gì cả; nó chỉ khiến AWS không chặn bạn ở mức 1000.
- Quotas are per account, so a noisy workload in a shared account eats the whole account's headroom. Splitting workloads into separate accounts is a legitimate way to get more limit — and a common exam answer. Quota tính theo account, nên một workload ồn ào trong account dùng chung sẽ ngốn hết dư địa của cả account. Tách workload ra account riêng là cách hợp lệ để có thêm giới hạn — và là đáp án hay gặp trong đề thi.
Exam reflexesPhản xạ khi thi
| The question says…Đề nói… | AnswerTrả lời |
|---|---|
| "Be notified before we reach a service limit""Được báo trước khi chạm giới hạn service" | CloudWatch alarm on quota usage, created in Service QuotasCloudWatch alarm trên quota usage, tạo trong Service Quotas |
| "Increase the limit, least operational effort""Nâng giới hạn, ít công vận hành nhất" | Service Quotas request — not a Support ticketYêu cầu qua Service Quotas — không phải mở Support ticket |
| "Every new account in the organization must have raised limits from day one""Mọi account mới trong organization phải có giới hạn cao ngay từ đầu" | Quota request template in the management accountQuota request template trong management account |
| "Trusted Advisor flagged we're near a limit — now automatically fix it""Trusted Advisor báo sắp chạm giới hạn — giờ tự động xử lý" | Trusted Advisor only reports; the increase happens in Service QuotasTrusted Advisor chỉ báo cáo; việc nâng diễn ra ở Service Quotas |
"Requests started failing with LimitExceededException under load""Request bắt đầu lỗi LimitExceededException khi tải cao" |
A quota was hit — check the applied value in that region, then raise itĐã chạm quota — kiểm tra applied value ở region đó, rồi nâng lên |
| "We raised it but the DR region still fails / the limit can't be raised""Đã nâng rồi mà region DR vẫn lỗi / giới hạn không nâng được" | Quotas are per region; and if it's non-adjustable, split across accounts or regionsQuota tính theo region; và nếu là non-adjustable, hãy chia ra nhiều account hoặc nhiều region |