# Amazon SQS limits and quotas

AWS limits and quotas · Updated 17 November 2026

**Short answer:** An SQS message can be up to 1 MiB (1,048,576 bytes); larger payloads go to S3 via the Extended Client Library. Messages are kept for 4 days by default and up to 14 days, the visibility timeout ranges from 0 seconds to 12 hours (default 30 seconds), and a standard queue allows roughly 120,000 in-flight messages (FIFO: 120,000). Batches hold up to 10 messages and long polling waits at most 20 seconds.

## SQS limits at a glance

| Setting or quota | Minimum | Default | Maximum |
|---|---|---|---|
| Message size (MaximumMessageSize) | 1 KiB | 1 MiB | 1 MiB (2 GB via S3 extended client) |
| Retention (MessageRetentionPeriod) | 60 seconds | 4 days (345,600 s) | 14 days (1,209,600 s) |
| Visibility timeout | 0 seconds | 30 seconds | 12 hours (43,200 s) |
| Queue delay (DelaySeconds) and message timer | 0 | 0 | 15 minutes |
| Long polling wait (ReceiveMessageWaitTimeSeconds) | 0 | 0 | 20 seconds |
| Messages per send, receive or delete batch | 1 | - | 10 |
| Message attributes | - | - | 10 per message |
| Queue name | 1 character | - | 80 characters |
| Messages stored in a queue | - | - | Unlimited |

None of these can be raised through Service Quotas; they are part of the API.

## In-flight messages and throughput

**In-flight** means received by a consumer and not yet deleted. A standard queue allows approximately 120,000 in flight, depending on traffic and backlog. With short polling you get an `OverLimit` error when you reach it; with long polling SQS simply returns no new messages, which looks like an idle queue even though `ApproximateNumberOfMessagesVisible` is high. FIFO queues also support up to 120,000 in-flight messages and do not return an error; processing just slows. Both can be raised only through AWS Support.

**Throughput:** standard queues accept a nearly unlimited number of API calls per second. FIFO queues are limited per partition to 300 transactions per second per action (send, receive, delete) without high throughput mode, or 3,000 messages per second when every call is a batch of 10. High throughput FIFO raises this much further, and the limit varies by Region (the highest Regions document up to 70,000 transactions per second without batching).

## What hitting each limit looks like

- **Message too large:** `InvalidParameterValue`, with a reason saying the message must be shorter than the queue's limit, when the body plus attributes exceeds `MaximumMessageSize`. The queue setting can be lower than 1 MiB, so check it before assuming the hard limit.
- **Retention:** messages silently disappear when they reach the retention period, whether or not they were processed. Watch [ApproximateAgeOfOldestMessage](https://cloudconsole.dev/alarms/sqs-approximateageofoldestmessage) against the retention value.
- **Visibility timeout too short:** messages are processed twice; see [visibility timeout](https://cloudconsole.dev/config/sqs-visibility-timeout).
- **Dead-letter queue retention:** for standard queues the original enqueue time is kept, so a DLQ with the same retention as its source deletes moved messages early. Give the DLQ a longer retention; see [redrive settings](https://cloudconsole.dev/config/sqs-redrive-policy-maxreceivecount).

## Check and change a queue's limits

```
aws sqs get-queue-attributes --queue-url https://sqs.eu-west-2.amazonaws.com/123456789012/orders \
  --attribute-names MaximumMessageSize MessageRetentionPeriod VisibilityTimeout ApproximateNumberOfMessagesNotVisible

# Keep messages 14 days and allow the full 1 MiB
aws sqs set-queue-attributes --queue-url https://sqs.eu-west-2.amazonaws.com/123456789012/orders \
  --attributes MessageRetentionPeriod=1209600,MaximumMessageSize=1048576
```

`ApproximateNumberOfMessagesNotVisible` is the in-flight count; compare it with the 120,000 ceiling when consumers seem to stall. Most attribute changes take up to 60 seconds to apply; a retention change can take up to 15 minutes and also affects messages already in the queue.

## Designing around the limits

- Keep messages small: send IDs and S3 keys, not documents. The Extended Client Library (Java and Python) does this automatically up to 2 GB.
- Delete messages as soon as they are processed, and use batch deletes to stay well under the in-flight cap.
- For Lambda consumers, remember the 6 MB invocation payload: a batch of ten 1 MiB messages fits, but a batch window that collects more will be split.
- Use several queues, or several message group IDs on FIFO, when one queue cannot keep up.

## Questions

### What is the maximum message size in SQS?

1 MiB (1,048,576 bytes), including attributes. Use the SQS Extended Client Library to store bodies up to 2 GB in S3.

### How long can a message stay in SQS?

Up to 14 days. The default retention is 4 days and the minimum is 60 seconds.

### Is there a limit to the number of messages in an SQS queue?

No limit on stored messages, but in-flight messages (received and not deleted) are capped at about 120,000 for standard queues.

## When this happens away from your desk

Queue limits show up as a growing backlog or messages vanishing at the retention boundary. CloudConsole, a phone app for AWS, is being built to show queue-age alarms on your phone so you can react before messages expire.

[About the CloudConsole app](https://cloudconsole.dev/aws-console-app) · [Download on the App Store](https://apps.apple.com/app/cloudconsole-for-aws/id6835419710)

## Sources

- [Amazon SQS message quotas](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/quotas-messages.html)
- [Amazon SQS standard queue quotas](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/quotas-queues.html)
- [SetQueueAttributes](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_SetQueueAttributes.html)

## Related

- [SQS visibility timeout](https://cloudconsole.dev/config/sqs-visibility-timeout)
- [SQS redrive policy, maxReceiveCount and dead-letter queue settings](https://cloudconsole.dev/config/sqs-redrive-policy-maxreceivecount)
- [aws sqs send-message](https://cloudconsole.dev/cli/sqs-send-message)
- [aws sqs get-queue-attributes](https://cloudconsole.dev/cli/sqs-get-queue-attributes)
- [CloudWatch alarm: SQS ApproximateAgeOfOldestMessage](https://cloudconsole.dev/alarms/sqs-approximateageofoldestmessage)
- [Lambda payload size limit](https://cloudconsole.dev/limits/lambda-payload-size-limit)

---

Source: https://cloudconsole.dev/limits/sqs-limits

CloudConsole is an independent iPhone and Android app for Amazon Web Services by Cloudconcur Ltd. It is not affiliated with Amazon Web Services.
