

# AWS Cloud Map service quotas
<a name="cloud-map-limits"></a>

AWS Cloud Map resources are subject to the following account-level service quotas. Each quota listed applies to each AWS Region where you create AWS Cloud Map resources.

[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/cloud-map/latest/dg/cloud-map-limits.html)

**\$1** When you create a namespace, we automatically create an Amazon Route 53 hosted zone. This hosted zone counts against the quota on the number of hosted zones that you can create with an AWS account. For more information, see [Quotas on hosted zones](https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/DNSLimitations.html#limits-api-entities-hosted-zones) in the *Amazon Route 53 Developer Guide*.

**\$1\$1** Increasing the instances for DNS namespaces for AWS Cloud Map requires an increase to the records per hosted zone Route 53 limit, which incurs additional charges.

# Managing your AWS Cloud Map service quotas
<a name="service-quotas-manage"></a>

AWS Cloud Map has integrated with Service Quotas, an AWS service that enables you to view and manage your quotas from a central location. For more information, see [What is Service Quotas?](https://docs.aws.amazon.com/servicequotas/latest/userguide/intro.html) in the *Service Quotas User Guide*.

Service Quotas makes it easy to look up the value of your AWS Cloud Map service quotas.

------
#### [ AWS Management Console ]

**To view AWS Cloud Map service quotas using the AWS Management Console**

1. Open the Service Quotas console at [https://console.aws.amazon.com/servicequotas/](https://console.aws.amazon.com/servicequotas/).

1. In the navigation pane, choose **AWS services**.

1. From the **AWS services** list, search for and select **AWS Cloud Map**.

1. In the service quotas list for AWS Cloud Map, you can see the service quota name, applied value (if it is available), AWS default quota, and whether the quota value is adjustable.

   To view additional information about a service quota, such as the description, choose the quota name to bring up the quota details.

1. (Optional) To request a quota increase, select the quota that you want to increase and choose **Request increase at account-level**.

To work more with service quotas using the AWS Management Console see the [Service Quotas User Guide](https://docs.aws.amazon.com/servicequotas/latest/userguide/intro.html).

------
#### [ AWS CLI ]

**To view AWS Cloud Map service quotas using the AWS CLI**  
Run the following command to view the default AWS Cloud Map quotas.

```
aws service-quotas list-aws-default-service-quotas \
    --query 'Quotas[*].{Adjustable:Adjustable,Name:QuotaName,Value:Value,Code:QuotaCode}' \
    --service-code AWSCloudMap \
    --output table
```

Run the following command to view your applied AWS Cloud Map quotas.

```
aws service-quotas list-service-quotas \
    --service-code AWSCloudMap
```

For more information about working with service quotas using the AWS CLI, see the [Service Quotas AWS CLI Command Reference](https://docs.aws.amazon.com/cli/latest/reference/service-quotas/#cli-aws-service-quotas). To request a quota increase, see the [https://docs.aws.amazon.com/cli/latest/reference/service-quotas/request-service-quota-increase.html](https://docs.aws.amazon.com/cli/latest/reference/service-quotas/request-service-quota-increase.html) command in the [AWS CLI Command Reference](https://docs.aws.amazon.com/cli/latest/reference/service-quotas/#cli-aws-service-quotas).

------

# Handle AWS Cloud Map DiscoverInstances API request throttling
<a name="throttling"></a>

AWS Cloud Map throttles [DiscoverInstances](https://docs.aws.amazon.com/cloud-map/latest/api/API_DiscoverInstances.html) API requests for each AWS account on a per-Region basis. Throttling helps improve the performance of the service and helps provide fair usage for all AWS Cloud Map customers. Throttling ensures that calls to the AWS Cloud Map [DiscoverInstances](https://docs.aws.amazon.com/cloud-map/latest/api/API_DiscoverInstances.html) API doesn't exceed the maximum allowed [DiscoverInstances](https://docs.aws.amazon.com/cloud-map/latest/api/API_DiscoverInstances.html) API request quotas. [DiscoverInstances](https://docs.aws.amazon.com/cloud-map/latest/api/API_DiscoverInstances.html) API calls originating from any of the following sources are subject to the request quotas:
+ A third-party application
+ A command line tool
+ The AWS Cloud Map console

If you exceed an API throttling quota, you get the `RequestLimitExceeded` error code. For more information, see [Request rate limiting](#throttling-rate-based).

## How throttling is applied
<a name="throttling-how"></a>

AWS Cloud Map uses the [token bucket algorithm](https://en.wikipedia.org/wiki/Token_bucket) to implement API throttling. With this algorithm, your account has a *bucket* that holds a specific number of *tokens*. The number of tokens in the bucket represents your throttling quota at any given second. There is one bucket for a single Region, and it applies to all endpoints in the Region.

### Request rate limiting
<a name="throttling-rate-based"></a>

Throttling limits the number of [DiscoverInstances](https://docs.aws.amazon.com/cloud-map/latest/api/API_DiscoverInstances.html) API requests that you can make. Each request removes one token from the bucket. For example, the bucket size for the [DiscoverInstances](https://docs.aws.amazon.com/cloud-map/latest/api/API_DiscoverInstances.html) API operation is 2,000 tokens, so you can make up to 2,000 [DiscoverInstances](https://docs.aws.amazon.com/cloud-map/latest/api/API_DiscoverInstances.html) requests in one second. If you exceed 2,000 requests in one second, you're throttled and the remaining requests within that second fail.

Buckets automatically refill at a set rate. If the bucket isn't at capacity, a set number of tokens is added back every second until the bucket reaches capacity. If the bucket is at capacity when refill tokens arrive, then these tokens are discarded. The bucket size for the [DiscoverInstances](https://docs.aws.amazon.com/cloud-map/latest/api/API_DiscoverInstances.html) API operation is 2,000 tokens, and the refill rate is 1,000 tokens every second. If you make 2,000 [DiscoverInstances](https://docs.aws.amazon.com/cloud-map/latest/api/API_DiscoverInstances.html) API requests in a second, the bucket is immediately reduced to zero (0) tokens. The bucket is then refilled by up to 1,000 tokens every second until it reaches its maximum capacity of 2,000 tokens.

You can use tokens as they are added to the bucket. You don't need to wait for the bucket to be at maximum capacity before you make API requests. If you deplete the bucket by making 2,000 [DiscoverInstances](https://docs.aws.amazon.com/cloud-map/latest/api/API_DiscoverInstances.html) API requests in one second, you can still make up to 1,000 [DiscoverInstances](https://docs.aws.amazon.com/cloud-map/latest/api/API_DiscoverInstances.html) API requests every second after that for as long as you need. This means that you can immediately use the refill tokens as they are added to your bucket. The bucket only starts to refill to the maximum capacity when you make fewer API requests every second than the refill rate.

### Retries or batch processing
<a name="retries"></a>

If an API request fails, your application might need to retry the request. To reduce the number of API requests, use an appropriate sleep interval between successive requests. For best results, use an increasing or variable sleep interval.

### Calculating the sleep interval
<a name="calculate_delay_interval"></a>

When you have to poll or retry an API request, we recommend using an exponential backoff algorithm to calculate the sleep interval between API calls. By using progressively longer wait times between retries for consecutive error responses, you can reduce the number of failed requests. For more information and implementation examples of this algorithm, see [Retry Behavior](https://docs.aws.amazon.com/sdkref/latest/guide/feature-retry-behavior.html) in the *AWS SDKs and Tools Reference Guide*.

## Adjusting API throttling quotas
<a name="throttling-increase"></a>

You can request an increase to API throttling quotas for your AWS account. To request a quota adjustment, contact the [AWS Support Center](https://console.aws.amazon.com/support/home#/).