Amazon SQS quotas - Amazon Simple Queue Service

Amazon SQS quotas

This topic lists quotas within Amazon Simple Queue Service (Amazon SQS).

Quotas related to queues

The following table lists quotas related to queues.

Quota Description
Delay queue The default (minimum) delay for a queue is 0 seconds. The maximum is 15 minutes.
Listed queues 1,000 queues per ListQueues request.
Long polling wait time The maximum long polling wait time is 20 seconds.
Message groups There is no quota to the number of message groups within a FIFO queue.
Messages per queue (backlog) The number of messages that an Amazon SQS queue can store is unlimited.
Messages per queue (in flight)

For most standard queues (depending on queue traffic and message backlog), there can be a maximum of approximately 120,000 inflight messages (received from a queue by a consumer, but not yet deleted from the queue). If you reach this quota while using short polling, Amazon SQS returns the OverLimit error message. If you use long polling, Amazon SQS returns no error messages. To avoid reaching the quota, you should delete messages from the queue after they're processed. You can also increase the number of queues you use to process your messages. To request a quota increase, submit a support request.

For FIFO queues, there can be a maximum of 20,000 inflight messages (received from a queue by a consumer, but not yet deleted from the queue). If you reach this quota, Amazon SQS returns no error messages.

Queue name

A queue name can have up to 80 characters. The following characters are accepted: alphanumeric characters, hyphens (-), and underscores (_).

Note

Queue names are case-sensitive (for example, Test-queue and test-queue are different queues).

The name of a FIFO queue must end with the .fifo suffix. The suffix counts towards the 80-character queue name quota. To determine whether a queue is FIFO, you can check whether the queue name ends with the suffix.

Queue tag

We don't recommend adding more than 50 tags to a queue.

The tag Key is required, but the tag Value is optional.
The tag Key and tag Value are case-sensitive.
The tag Key and tag Value can include Unicode alphanumeric characters in UTF-8 and whitespaces. The following special characters are allowed: _ . : / = + - @
The tag Key or Value must not include the reserved prefix aws: (you can't delete tag keys or values with this prefix).
The maximum tag Key length is 128 Unicode characters in UTF-8. The tag Key must not be empty or null.
The maximum tag Value length is 256 Unicode characters in UTF-8. The tag Value may be empty or null.
Tagging actions are limited to 5 TPS per AWS account. If your application requires a higher throughput, submit a request.

Quotas related to messages

The following table lists quotas related to messages.

Quota Description
Batched message ID A batched message ID can have up to 80 characters. The following characters are accepted: alphanumeric characters, hyphens (-), and underscores (_).
Message attributes A message can contain up to 10 metadata attributes.
Message batch

A single message batch request can include a maximum of 10 messages. For more information, see Configuring AmazonSQSBufferedAsyncClient in the Amazon SQS batch actions section.

Message content

A message can include only XML, JSON, and unformatted text. The following Unicode characters are allowed: #x9 | #xA | #xD | #x20 to #xD7FF | #xE000 to #xFFFD | #x10000 to #x10FFFF

Any characters not included in this list are rejected. For more information, see the W3C specification for characters.

Message group ID Consume messages from the backlog to avoid building up a large backlog of messages with the same message group ID.
Message retention By default, a message is retained for 4 days. The minimum is 60 seconds (1 minute). The maximum is 1,209,600 seconds (14 days).
Message throughput Standard queues support a nearly unlimited number of API calls per second, per API action (SendMessage, ReceiveMessage, or DeleteMessage).

FIFO queues

  • If you use batching, FIFO queues support up to 3,000 transactions per second, per API method (SendMessageBatch, ReceiveMessage, or DeleteMessageBatch). The 3000 transactions represent 300 API calls, each with a batch of 10 messages. To request a quota increase, submit a support request.

  • Without batching, FIFO queues support up to 300 API calls per second, per API method (SendMessage, ReceiveMessage, or DeleteMessage).

Message timer The default (minimum) delay for a message is 0 seconds. The maximum is 15 minutes.
Message size

The minimum message size is 1 byte (1 character). The maximum is 262,144 bytes (256 KB).

To send messages larger than 256 KB, you can use the Amazon SQS Extended Client Library for Java. This library allows you to send an Amazon SQS message that contains a reference to a message payload in Amazon S3. The maximum payload size is 2 GB.

Message visibility timeout The default visibility timeout for a message is 30 seconds. The minimum is 0 seconds. The maximum is 12 hours.
Policy information The maximum quota is 8,192 bytes, 20 statements, 50 principals, or 10 conditions. For more information, see Quotas related to policies.

Quotas related to policies

The following table lists quotas related to policies.

Name Maximum
Bytes 8,192
Conditions 10
Principals 50
Statements 20