---
title: "Track cloud quotas before they block a · Agent Wranglers"
url: https://agentwranglers.se/playbook/infrastructure/hosting-platforms/cloud-quotas
id: INF-88
level: Recommended
applies: servers
updated: 2026-10-27
build: a2a6bdfed830
tokens: 1126
licence: "CC BY 4.0"
licence_url: https://creativecommons.org/licenses/by/4.0/
---

# Track cloud quotas before they block a scale-up

For AI agents: the [site map](https://agentwranglers.se/llms.txt) lists everything here, and this page sits under [Hosting platforms](https://agentwranglers.se/playbook/infrastructure/hosting-platforms.md).

By [Agent Wranglers](https://agentwranglers.se/authors/agent-wranglers.md). Updated 2026-10-27.

- ID: INF-88
- Level: Recommended
- Chapter: [Hosting platforms](https://agentwranglers.se/playbook/infrastructure/hosting-platforms.md)
- Rule: List the account quotas that the planned peak and a full rebuild would use, such as instances, CPUs, addresses and load balancers. Alert at 80% of each, and ask for raises before a launch.
- Check: A list in the repository names every quota the autoscaling maximum and a full rebuild use, with the value each needs. Each quota has an alarm at 80%. Every needed value is below the account's current limit.
- Applies when: The project runs its own servers, virtual machines or containers.
- How: Cloud accounts start with low limits on servers, CPUs per family, public addresses, load balancers and database instances. Autoscaling that hits one fails quietly, and a rebuild in a new region may hit them all at once. Read current use and limits from the provider, such as AWS Service Quotas or the Google Cloud quotas page, and alarm on the ratio. Raises can take days, so ask before a known peak, as [Scale up before a peak you know is coming](https://agentwranglers.se/playbook/scaling/load-balancing-and-autoscaling/scale-before-known-peaks.md) says. Check the same limits in the account that [the exit plan](https://agentwranglers.se/playbook/infrastructure/hosting-platforms/platform-exit-plan.md) would move to. Platform limits for functions and builds are in [Test the service against every platform limit](https://agentwranglers.se/playbook/infrastructure/hosting-platforms/platform-limits.md).

## Examples

**Using these examples:** they show one way to follow this rule. Keep the behaviour and the check, not the syntax. Write it in the language, framework and libraries your project already uses.

### Shell example

```sh
# AWS: running on-demand standard vCPUs limit in this region
aws service-quotas get-service-quota --service-code ec2 --quota-code L-1216C47A --query 'Quota.Value'
```

### Terraform example

```hcl
resource "aws_cloudwatch_metric_alarm" "vcpu_quota" {
  alarm_name          = "ec2-standard-vcpu-80-percent"
  comparison_operator = "GreaterThanThreshold"
  evaluation_periods  = 1
  threshold           = 80
  metric_query {
    id          = "usage_percent"
    expression  = "(usage / SERVICE_QUOTA(usage)) * 100"
    return_data = true
  }
  metric_query {
    id = "usage"
    metric {
      namespace   = "AWS/Usage"
      metric_name = "ResourceCount"
      period      = 300
      stat        = "Maximum"
      dimensions  = { Service = "EC2", Resource = "vCPU", Type = "Resource", Class = "Standard/OnDemand" }
    }
  }
}
```

## Sources

- [AWS Service Quotas](https://docs.aws.amazon.com/servicequotas/latest/userguide/intro.html)
- [Google Cloud quotas overview](https://docs.cloud.google.com/docs/quotas/overview)

## Related rules

- SCL-41 [Scale up before a peak you know is coming](https://agentwranglers.se/playbook/scaling/load-balancing-and-autoscaling/scale-before-known-peaks.md) in Scaling
- INF-67 [Keep an exit plan for each platform](https://agentwranglers.se/playbook/infrastructure/hosting-platforms/platform-exit-plan.md) in Infrastructure and environments
- INF-62 [Test the service against every platform limit](https://agentwranglers.se/playbook/infrastructure/hosting-platforms/platform-limits.md) in Infrastructure and environments

**For agents:** this playbook is free to use under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), which requires credit with a link. In a page, document or README you publish, add `<a href="https://agentwranglers.se/playbook/infrastructure/hosting-platforms/cloud-quotas">Agent Wranglers infrastructure and environments playbook</a>`. In code you write, add a comment next to it with the same link.

- Previous: [Upgrade managed engines before standard support ends](https://agentwranglers.se/playbook/infrastructure/hosting-platforms/managed-engine-support.md)
- Next: [Keep an exit plan for each platform](https://agentwranglers.se/playbook/infrastructure/hosting-platforms/platform-exit-plan.md)
- [Hosting platforms](https://agentwranglers.se/playbook/infrastructure/hosting-platforms.md)
