How can I request, view, and manage service quota increase requests using AWS CLI commands?

Last updated: 2020-09-08

How can I request service quota increases and then view and manage those requests using AWS Command Line Interface (AWS CLI) commands?

Short description

You can request, view, and manage AWS service quotas, formerly known as limits, from the Service Quotas console or using AWS CLI commands.

For a list of service quota AWS CLI commands, see AWS CLI Command Reference and the Service Quotas API Reference.

When using the AWS CLI to manage your service quotas, keep the following in mind:

Resolution

Note: Each AWS service available in Service Quotas has a service code associated with it. Within each service, each available quota type has a quota code. You need these codes to request service quota increases.

Run the list-services command to see the list of service codes for your Region. Replace eu-west-1 with your Region:

# aws service-quotas list-services --region eu-west-1 --output table

Run the list-service-quota command to see available quota codes for a particular service and Region. In the following example, replace --service-code and --region with your specific service and Region. The following example requests service quotas for Amazon Elastic Compute Cloud (Amazon EC2) in the eu-west-1 Region.

# aws service-quotas list-service-quotas --service-code ec2 --region eu-west-1 --query "Quotas[*].{ServiceName:ServiceName,QuotaName:QuotaName,QuotaCode:QuotaCode,Value:Value}" --output table

Request a service quota increase

When requesting a service quota increase, check the current limit, and then increase the service quota in a particular AWS Region.

1.    Run the get-service-quota command to check the applied quota value for the service you want to increase. The following example requests the service quota for the number of EIPs in EC2 in the eu-west-1 Region. Replace the --service-code, --quota-code, and --region with the appropriate values for your request.

# aws service-quotas get-service-quota --service-code ec2 --quota-code L-0263D0A3 --region eu-west-1
{
    "Quota": {
        "ServiceCode": "ec2",
        "ServiceName": "Amazon Elastic Compute Cloud (Amazon EC2)",
        "QuotaArn": "arn:aws:servicequotas:eu-west-1:111122223333:ec2/L-0263D0A3",
        "QuotaCode": "L-0263D0A3",
        "QuotaName": "Number of EIPs - VPC EIPs",
        "Value": 5.0,
        "Unit": "None",
        "Adjustable": true,
        "GlobalQuota": false
    }
}

2.    Request a quota increase using the request-service-quota-increase command. The following example requests a quota increase for Number of EIPs in EC2 in the eu-west-1 Region. Replace the --service-code, --quota-code, and --region with the appropriate values for your request.

# aws service-quotas request-service-quota-increase --service-code ec2 --quota-code L-0263D0A3 --region eu-west-1 --desired-value 10
{
    "RequestedQuota": {
        "Id": "d323c5f4eb8d400e96fbf34743b373a7YRHQ2y20",
        "ServiceCode": "ec2",
        "ServiceName": "Amazon Elastic Compute Cloud (Amazon EC2)",
        "QuotaCode": "L-0263D0A3",
        "QuotaName": "Number of EIPs - VPC EIPs",
        "DesiredValue": 10.0,
        "Status": "PENDING",
        "Created": 1576431516.421,
        "Requester": "{\"accountId\":\"111122223333\",\"callerArn\":\"arn:aws:iam::111122223333:user/testeksuser\"}",
        "QuotaArn": "arn:aws:servicequotas:eu-west-1:111122223333:ec2/L-0263D0A3",
        "GlobalQuota": false,
        "Unit": "None"
    }

After creating the request, you can track the new case using the Service Quotas console. Or, you can use the AWS CLI to check the request status.

Check the status of a service quota increase request

Run the get-requested-service-quota-change command to check the status of a pending request. In the following example, replace the --request-id and --region with the values of your request. The output shows the Case ID and the Status of the request.

# aws service-quotas get-requested-service-quota-change --request-id "d323c5f4eb8d400e96fbf34743b373a7YRHQ2y20" --region eu-west-1
{
    "RequestedQuota": {
        "Id": "d323c5f4eb8d400e96fbf34743b373a7YRHQ2y20",
        "CaseId": "6672648091",
        "ServiceCode": "ec2",
        "ServiceName": "Amazon Elastic Compute Cloud (Amazon EC2)",
        "QuotaCode": "L-0263D0A3",
        "QuotaName": "Number of EIPs - VPC EIPs",
        "DesiredValue": 10.0,
        "Status": "CASE_OPENED",
        "Created": 1576431516.421,
        "LastUpdated": 1576431520.527,
        "Requester": "{\"accountId\":\"111122223333\",\"callerArn\":\"arn:aws:iam::111122223333:user/testeksuser\"}",
        "QuotaArn": "arn:aws:servicequotas:eu-west-1:111122223333:ec2/L-0263D0A3",
        "GlobalQuota": false,
        "Unit": "None"
    }
}

After a quota increase request reaches CASE_CLOSED, APPROVED, or DENIED status, you can check the details of the request. Service quota increase request history is kept for 90 days. For more information, see ListRequestedServiceQuotaChangeHistoryByQuota.

# aws service-quotas get-requested-service-quota-change --request-id "d323c5f4eb8d400e96fbf34743b373a7YRHQ2y20" --region eu-west-1
{
    "RequestedQuota": {
        "Id": "d323c5f4eb8d400e96fbf34743b373a7YRHQ2y20",
 
                                          "CaseId": "6672648091",
        "ServiceCode": "ec2",
        "ServiceName": "Amazon Elastic Compute Cloud (Amazon EC2)",
       
                                    "QuotaCode": "L-0263D0A3",
        "QuotaName": "Number of EIPs - VPC EIPs",
        "DesiredValue": 10.0,
        "Status": "CASE_CLOSED",
 
                                          "Created": 1576431516.421,
        "LastUpdated": 1576432913.04,
        "Requester": "{\"accountId\":\"111122223333\",\"callerArn\":\"arn:aws:iam::111122223333:user/testeksuser\"}",
 
                                          "QuotaArn": "arn:aws:servicequotas:eu-west-1:111122223333:ec2/L-0263D0A3",
        "GlobalQuota": false,
        "Unit": "None"
    }
}

Track multiple service quota increase requests

Using the following APIs, you can check:

  • All requests made in a particular Region, including all services and all their respective quotas codes.
  • All requests made for a particular Region specific to a particular quota code.

Example 1

Run the following command to check the status of all requests made in a specific Region, including all services and their associated quota codes:

# aws service-quotas list-requested-service-quota-change-history --region eu-west-1 --query "RequestedQuotas[*].{CaseId:CaseId,Id:Id,QuotaCode:QuotaCode,QuotaName:QuotaName,DesiredValue:DesiredValue,Status:Status}" --output table
-------------------------------------------------------------------------------------------------------------------------------------------------
|                                                    ListRequestedServiceQuotaChangeHistory                                                     |
+------------+---------------+--------------------------------------------+-------------+----------------------------------------+--------------+
|   CaseId   | DesiredValue  |                    Id                      |  QuotaCode  |               QuotaName                |   Status     |
+------------+---------------+--------------------------------------------+-------------+----------------------------------------+--------------+
|  None      |  50.0         |  2f919bc7e8b942e4a4d9e48b70e714547VLCFkjY  |  L-3D9CCA6E |  Tasks per Maintenance Window          |  APPROVED    |
|  6673136551|  10.0         |  cc07103300c74653911cebbd78739dacEToPmn3Z  |  L-DE82EABA |  Running Dedicated g3 Hosts            |  CASE_OPENED |
|  6673112701|  10.0         |  fb78996c9c364915825bab46f2b6a313J8FAIAFm  |  L-8CCBD91B |  Running On-Demand m5d hosts           |  CASE_OPENED |
|  6673109881|  10.0         |  06db5543f3a74dcda55346ca4812a6a0H4jikbty  |  L-24D7D4AD |  Running On-Demand m5n hosts           |  CASE_OPENED |
|  6673043811|  10.0         |  0cf070a56ae742acaf5143f5685d9cc8pGWjHH9l  |  L-0263D0A3 |  Number of EIPs - VPC EIPs             |  CASE_OPENED |
|  6672648091|  10.0         |  d323c5f4eb8d400e96fbf34743b373a7YRHQ2y20  |  L-0263D0A3 |  Number of EIPs - VPC EIPs             |  CASE_CLOSED |
+------------+---------------+--------------------------------------------+-------------+----------------------------------------+--------------+

Example 2

Run the following command to check the status of all of your requests made for a specific quota code:

# aws service-quotas list-requested-service-quota-change-history-by-quota --service-code ec2 --quota-code L-0263D0A3 --region eu-west-1 --query "RequestedQuotas[*].{CaseId:CaseId,Id:Id,QuotaCode:QuotaCode,QuotaName:QuotaName,DesiredValue:DesiredValue,Status:Status}" --output table
--------------------------------------------------------------------------------------------------------------------------------------
|                                            ListRequestedServiceQuotaChangeHistoryByQuota                                           |
+------------+---------------+--------------------------------------------+-------------+----------------------------+---------------+
|   CaseId   | DesiredValue  |                    Id                      |  QuotaCode  |         QuotaName          |    Status     |
+------------+---------------+--------------------------------------------+-------------+----------------------------+---------------+
|  6673043811|  10.0         |  0cf070a56ae742acaf5143f5685d9cc8pGWjHH9l  |  L-0263D0A3 |  Number of EIPs - VPC EIPs |  CASE_OPENED  |
|  6672648091|  10.0         |  d323c5f4eb8d400e96fbf34743b373a7YRHQ2y20  |  L-0263D0A3 |  Number of EIPs - VPC EIPs |  CASE_CLOSED  |
+------------+---------------+--------------------------------------------+-------------+----------------------------+---------------+