Guidelines and quotas in Amazon Rekognition - Amazon Rekognition

Guidelines and quotas in Amazon Rekognition

The following sections provide guidelines and quotas when using Amazon Rekognition. There are two kinds of quotas. Set quotas such as maximum image size cannot be changed. Default quotas listed on the AWS Service Quotas page can be changed by following the procedure described in the Default quotas section.

Supported regions

For a list of AWS Regions where Amazon Rekognition is available, see AWS Regions and Endpoints in the Amazon Web Services General Reference.

Set quotas

The following is a list of limits in Amazon Rekognition that cannot be changed. For information about limits you can change, such as Transactions Per Second (TPS) limits, see Default quotas.

For Amazon Rekognition Custom Labels limits, see Guidelines and Quotas in Amazon Rekognition Custom Labels.

Amazon Rekognition Image

  • Maximum image size stored as an Amazon S3 object is limited to 15 MB.

  • The minimum image dimensions is 80 pixels for both height and width. The minimum image dimension for DetectProtectiveEquipment is 64 pixels for both height and width.

  • The maximum image dimensions for DetectProtectiveEquipment is 4096 pixels for both width and height.

  • To be detected by DetectProtectiveEquipment, a person must be no smaller than 100x100 pixels in an image with 800x1300. Images with dimensions higher than 800x1300 pixels will need a larger minimum person size proportionally.

  • To be detected, a face must be no smaller than 40x40 pixels in an image with 1920X1080 pixels. Images with dimensions higher than 1920X1080 pixels will need a larger minimum face size proportionally.

  • The Maximum images size as raw bytes passed in as parameter to an API is 5 MB. The limit is 4 MB for the DetectProtectiveEquipment API.

  • Amazon Rekognition supports the PNG and JPEG image formats. That is, the images you provide as input to various API operations, such as DetectLabels and IndexFaces must be in one of the supported formats.

  • The Maximum number of faces you can store in a single face collection is 20 million.

  • The maximum matching faces the search API returns is 4096.

  • DetectText can detect up to 50 words in an image.

  • DetectProtectiveEquipment can detect Personal Protective Equipment on up to 15 people.

For best practice information about images and facial comparison, see Best practices for sensors, input images, and videos.

Amazon Rekognition Video stored video

  • Amazon Rekognition Video can analyze stored videos up to 10GB in size.

  • Amazon Rekognition Video can analyze stored videos up to 6 hours in length.

  • Amazon Rekognition Video supports a maximum of 20 concurrent jobs per account.

  • Stored videos must be encoded using the H.264 codec. The supported file formats are MPEG-4 and MOV.

  • The Time To Live (TTL) period for pagination tokens is 24 hours. Pagination tokens are in the NextToken field retured by Get operations such as GetLabeldetection.

Amazon Rekognition Video streaming video

  • A Kinesis Video input stream can be associated with at most 1 Amazon Rekognition Video stream processor.

  • A Kinesis Data output stream can be associated with at most 1 Amazon Rekognition Video stream processor.

  • The Kinesis Video input stream and Kinesis Data output stream associated with an Amazon Rekognition Video stream processor cannot be shared by multiple processors.

Default quotas

A list of default quotas can be found at AWS Service Quotas. These limits are defaults and can be changed. To request a limit increase, you can create a case.

Best practices for TPS quotas

Recommended best practices for Transactions Per Second (TPS) include smoothening spiky traffic, configuring retries, and configuring exponential backoff and jitter.

  1. Smoothen spiky traffic. Spiky traffic impedes you from getting the maximum throughput out of the allotted TPS. Use a queue-like serverless architecture or another mechanism to smooth traffic to be more consistent. This will help allow you to get the maximum throughput possible.

  2. Configure retries. Follow the guidelines at Error handling to configure retries for the errors that allow them.

  3. Configure exponential backoff and jitter. Configuring exponential backoff and jitter as you configure retries allows you to improve the achievable throughput. See Error retries and exponential backoff in AWS.

Create a case to change TPS quotas

To create a case, go to Create Case and answer the following questions:

  • Have you implemented the Best practices for TPS quotas for smoothening your traffic spikes and configuring retries, exponential backoff, and jitter?

  • What is your use case?

  • What APIs do you plan to use?

  • What regions do you plan to use these APIs in?

  • Are you able to spread the load across multiple regions?

  • How many images do you process daily?

  • How long do you expect to sustain this volume (Is it a one-time spike or ongoing)?

  • How are you blocked by the default limit? Review the following exception table to confirm the scenario that you are encountering.

    Error Code Exception Message What does it mean? Can it be retried?
    HTTP status code 400

    ProvisionedThroughputExceededException

    Provisioned Rate exceeded.

    Indicates throttling. You can retry or evaluate a limit increase request.

    Yes

    HTTP status code 400

    ThrottlingException

    Slow down; sudden increase in rate of requests.

    You might be sending spiky traffic and encountering throttling. You should shape the traffic and make it more smooth and consistent. Then configure additional retries. See best practices. Yes
    HTTP status code 5xx ThrottlingException (HTTP 500) Service Unavailable

    Indicates that the backend is scaling up to support the action. You should retry the request.

    Yes

    For a detailed understanding of the error codes, see Error handling.

  • What is the new limit you are requesting? To calculate Transaction Per Second (TPS) limits required, review the following examples on how many transactions you can achieve with the existing limit defaults.

    TPS example for a region with 5 TPS default limit TPS example for a region with 50 TPS default limit

    1 second = 5 API calls

    1 minute = 5*60 = 300 API calls

    1 hour = 5*60*60 = 18,000 API calls

    1 day/24 hours = 5*60*60*24 = 432,000 API calls

    1 second = 50 API calls

    1 minute = 50*60 = 3,000 API calls

    1 hour = 50*60*60 = 180,000 API calls

    1 day/24 hours = 50*60*60*24 = 4,320,000 API calls

Note

These limits depend on the region you are in. Making a case to change a limit affects the API operation you request, in the region you request it. Other API operations and regions are not affected.