Amazon SQS message quotas
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: 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.
You must
associate a non-empty The length of
|
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 very high, nearly unlimited number of API calls per second, per action
( |
High throughput for FIFO queues Amazon SQS FIFO limits are based on the number of API requests, not message limits. For high throughput mode, these API request limits are as follows: Transaction throughput limits (Non-batching API calls) These limits define how frequently each API operation (such as SendMessage, ReceiveMessage, or DeleteMessage) can be performed independently, ensuring efficient system performance within the allowed transactions per second (TPS). The following limits are based on non-batched API calls:
Maximizing throughput with batching Processes multiple messages in a single API call, which significantly increasing efficiency. Instead of handling each message individually, batching allows you to send, receive, or delete up to 10 messages in a single API request. This reduces the total number of API calls, allowing you to process more messages per second while staying within the transaction limits (TPS) for the region, maximizing throughput and system performance. For more information, see Increasing throughput using horizontal scaling and action batching with Amazon SQS. The following limits are based on batched API calls:
Optimizing throughput beyond batching While batching can greatly increase throughput, it’s important to consider other strategies for optimizing FIFO performance:
|
|
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 KiB). To send messages larger than 256 KiB, you can use the Amazon SQS Extended Client Library for Java NoteThis extended library works only for synchronous clients. |
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 Amazon SQS policy quotas. |