How can I troubleshoot errors using the AWS CLI to manage my service quota requests?

5 minute read
0

When I use AWS Command Line Interface (AWS CLI) to manage my service quota increase, I receive errors.

Short description

The following are common errors that might occur when using the AWS CLI to view and manage quota increase requests:

  • The list-service-quotas command doesn't list all available quotas.
  • Error: "An error occurred (ResourceAlreadyExistsException) when calling the RequestServiceQuotaIncrease operation: Only one open service quota increase request is allowed per quota".
  • Error: "An error occurred (NoSuchResourceException) when calling the ListAWSDefaultServiceQuotas operation: The request failed because the specified service does not exist".

For general information on solving AWS CLI errors that aren't related to Service Quotas, see Why am I receiving errors when running AWS CLI commands?

Resolution

Verify that you're using the most recent version of the AWS CLI

If you're using an earlier version of AWS CLI, then you might encounter issues when using the API commands. Upgrade to the latest AWS CLI version, and then try the commands again.

Error: The list-service-quotas command doesn't list all available quotas

The list-service-quotas command returns quotas that have applied quota values. To return all default values, use the list-aws-default-service-quotas command.

The following example uses the list-service-quotas command. The output lists the two services that have applied values.

# aws service-quotas list-service-quotas --service-code vpc --region eu-west-1 --query "Quotas[*].{ServiceName:ServiceName,QuotaName:QuotaName,QuotaCode:QuotaCode,Value:Value}" --output table
------------------------------------------------------------------------------------------------------
| ListServiceQuotas |
+------------+--------------------------------+---------------------------------------------+--------+
| QuotaCode | QuotaName | ServiceName | Value |
+------------+--------------------------------+---------------------------------------------+--------+
| L-A4707A72| Internet gateways per Region | Amazon Virtual Private Cloud (Amazon VPC) | 10.0 |
| L-F678F1CE| VPCs per Region | Amazon Virtual Private Cloud (Amazon VPC) | 10.0 |
+------------+--------------------------------+---------------------------------------------+--------+

The following example uses the list-service-quota command. The output lists all quotas that are associated with the service (VPC, in this example) along with their default quota values.

# aws service-quotas list-aws-default-service-quotas --service-code vpc --region eu-west-1 --query "Quotas[*].{ServiceName:ServiceName,QuotaName:QuotaName,QuotaCode:QuotaCode,Value:Value}" --output table
-----------------------------------------------------------------------------------------------------------------------
| ListAWSDefaultServiceQuotas |
+------------+------------------------------------------------+---------------------------------------------+---------+
| QuotaCode | QuotaName | ServiceName | Value |
+------------+------------------------------------------------+---------------------------------------------+---------+
| L-7E9ECCDB| Active VPC peering connections per VPC | Amazon Virtual Private Cloud (Amazon VPC) | 50.0 |
| L-45FE3B85| Egress-only internet gateways per Region | Amazon Virtual Private Cloud (Amazon VPC) | 5.0 |
| L-1B52E74A| Gateway VPC endpoints per Region | Amazon Virtual Private Cloud (Amazon VPC) | 20.0 |
| L-83CA0A9D| IPv4 CIDR blocks per VPC | Amazon Virtual Private Cloud (Amazon VPC) | 5.0 |
| L-085A6257| IPv6 CIDR blocks per VPC | Amazon Virtual Private Cloud (Amazon VPC) | 1.0 |
| L-0EA8095F| Inbound or outbound rules per security group | Amazon Virtual Private Cloud (Amazon VPC) | 60.0 |
| L-29B6F2EB| Interface VPC endpoints per VPC | Amazon Virtual Private Cloud (Amazon VPC) | 50.0 |
| L-A4707A72| Internet gateways per Region | Amazon Virtual Private Cloud (Amazon VPC) | 5.0 |
| L-FE5A380F| NAT gateways per Availability Zone | Amazon Virtual Private Cloud (Amazon VPC) | 5.0 |
| L-B4A6D682| Network ACLs per VPC | Amazon Virtual Private Cloud (Amazon VPC) | 200.0 |
| L-DF5E4CA3| Network interfaces per Region | Amazon Virtual Private Cloud (Amazon VPC) | 5000.0 |
| L-DC9F7029| Outstanding VPC peering connection requests | Amazon Virtual Private Cloud (Amazon VPC) | 25.0 |
| L-2C462E13| Participant accounts per VPC | Amazon Virtual Private Cloud (Amazon VPC) | 100.0 |
| L-589F43AA| Route tables per VPC | Amazon Virtual Private Cloud (Amazon VPC) | 200.0 |
| L-93826ACB| Routes per route table | Amazon Virtual Private Cloud (Amazon VPC) | 50.0 |
| L-2AEEBF1A| Rules per network ACL | Amazon Virtual Private Cloud (Amazon VPC) | 20.0 |
| L-2AFB9258| Security groups per network interface | Amazon Virtual Private Cloud (Amazon VPC) | 5.0 |
| L-407747CB| Subnets per VPC | Amazon Virtual Private Cloud (Amazon VPC) | 200.0 |
| L-44499CD2| Subnets that can be shared with an account | Amazon Virtual Private Cloud (Amazon VPC) | 100.0 |
| L-8312C5BB| VPC peering connection request expiry hours | Amazon Virtual Private Cloud (Amazon VPC) | 168.0 |
| L-E79EC296| VPC security groups per Region | Amazon Virtual Private Cloud (Amazon VPC) | 2500.0 |
| L-F678F1CE| VPCs per Region | Amazon Virtual Private Cloud (Amazon VPC) | 5.0 |
+------------+------------------------------------------------+---------------------------------------------+---------+

Error: "An error occurred (ResourceAlreadyExistsException) when calling the RequestServiceQuotaIncrease operation: Only one open service quota increase request is allowed per quota."

Only one open service quota increase request is allowed per quota. If you submit another request before the previous one completes, then you receive the ResourceAlreadyExistsException error.

Before submitting another quota increase request, verify that the previous quota increase request completes.

Error: "An error occurred (NoSuchResourceException) when calling the ListAWSDefaultServiceQuotas operation: The request failed because the specified service does not exist."

This error might occur for the following reasons:

  • The customer is trying to access something that isn't integrated with service quotas.
  • Service codes are case sensitive. For example, you can't enter the value for service code ec2 as EC2. The following example shows the --service-code value correctly as ec2:
# aws service-quotas get-service-quota --service-code ec2 --quota-code L-0263D0A3 --region eu-west-1

Related information

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

What is Service Quotas?

Introducing Service Quotas: View and manage your quotas for AWS services from one central location

Service Quotas API reference

AWS CLI Command Reference - service-quotas

AWS OFFICIAL
AWS OFFICIALUpdated 2 years ago