aws_ sqs_ queue cost estimation
A managed message queue. Priced per request, with no per-queue or storage fee. Generous free tier.
An aws_
First, requests. Each API call (SendMessage, ReceiveMessage, DeleteMessage, etc.) counts as one request, billed per million. Standard queues are roughly $0.40 per million requests. FIFO queues are $0.50 per million.
The first 1 million SQS requests per month are free at the account level (not per-queue). This means small and even moderately-sized SQS deployments often pay nothing.
Second, data transfer out to the internet. SQS within a VPC or to/from the same region is free; egress to the public internet is billed at standard AWS rates.
A key efficiency consideration: each ReceiveMessage call can return up to 10 messages and a single ReceiveMessage with long polling counts as 1 request whether it returns 0 or 10 messages. Polling efficiently with batching can cut request costs by 10x.
c3x estimates SQS costs from usage data only. The queue itself has no recurring cost. Add monthly_
Terraform example
A minimal but realistic configuration that C3X can estimate.
resource "aws_sqs_queue" "jobs" {
name = "background-jobs"
visibility_timeout_seconds = 300
message_retention_seconds = 1209600
receive_wait_time_seconds = 20
redrive_policy = jsonencode({
deadLetterTargetArn = aws_sqs_queue.dlq.arn
maxReceiveCount = 3
})
}
resource "aws_sqs_queue" "dlq" {
name = "background-jobs-dlq"
message_retention_seconds = 1209600
}Pricing dimensions
What you actually pay for when you provision aws_.
| Dimension | Unit | What's being charged |
|---|---|---|
| Standard queue requests | per 1M requests | Each API call counts as 1 request. First 1M/month free at account level. $0.40/1M requests |
| FIFO queue requests | per 1M requests | FIFO requests are slightly more expensive than Standard. Higher consistency guarantees. $0.50/1M requests |
| Data transfer out | per GB | Egress to public internet. Free within VPC and same-region intra-AWS. |
| Extended client library payloads | per S3 PUT/GET | Messages larger than 256 KB use the SQS Extended Client Library to store payloads in S3. S3 costs apply, not extra SQS fees. |
Optimization tips
Common ways to reduce aws_ cost without changing the workload.
Use long polling (receive_ wait_ time_ seconds = 20)
Up to 90% on receive request countLong polling waits up to 20 seconds for messages instead of returning immediately. Reduces empty receives that cost the same as full ones. Default in modern AWS SDKs.
Batch receives and deletes
Up to 90% on requestsReceiveMessage with MaxNumberOfMessages=10 and DeleteMessageBatch return/delete up to 10 messages per request. A worker processing 10M messages/month pays for 1M requests instead of 10M.
Use FIFO only when you genuinely need ordering
25%FIFO is 25% more expensive per request and has lower throughput. Standard queues are correct for ~80% of use cases. Only switch to FIFO for true ordering requirements.
Avoid SQS for high-throughput, low-value messages
Volume-dependent at extreme scaleAt extreme throughput (>10B messages/month), Kinesis Data Streams or MSK can be cheaper per message than SQS. Crossover is workload-dependent.
FAQ
Why is my SQS cost zero in c3x estimate?
SQS has no per-queue or per-resource fee. Cost is entirely usage-driven. Add monthly_
Does the SQS free tier apply across all queues?
Yes. The 1M free requests per month is at the AWS account level, shared across all queues. c3x can apply this via account-level free tier settings.
How does Lambda + SQS billing work?
SQS-triggered Lambda functions pay both SQS request charges (for ReceiveMessage and DeleteMessage performed by the Lambda event source mapping) and Lambda invocation/duration charges. c3x estimates both resources independently.
Are dead-letter queue messages billed?
Yes. Messages moved to a DLQ count as one SendMessage operation on the DLQ. The DLQ itself is just another SQS queue and follows normal pricing.
Related resources
More AWS resources
Further reading
- Amazon MQ cost: broker instance hours plus storage
Amazon MQ bills broker instance hours by size and deployment (single or active-standby), plus storage. Active-standby doubles the instance cost for high availability. Here is how the managed-broker pricing works and when to use it.
- The cost of a message queue in the cloud
Managed message queues like SQS, Pub/Sub, and Azure Service Bus bill per request or per message, sometimes plus data and features. Here is how queue pricing works, what drives the bill, and how to keep messaging cost low.
- How much does it cost to run a webhook processing service?
A service receiving 30 million webhooks a month, processing them with retries, and archiving payloads costs about 506 dollars on AWS. Here is the breakdown, including the 150 dollar mistake almost everyone makes.
- Dead letter queue cost: what failure handling adds to the bill
Dead letter queues look free until a poison message or a bad deploy fills them. The cost is in redrive traffic, retry amplification, and storage of messages nobody reads. Here is the real arithmetic.
Estimate this resource in your own Terraform
Free, open source, no API key. C3X parses your Terraform and shows line-item cost for every resource, including aws_.