AWSAmazon SQSMessaging

aws_sqs_queue cost estimation

A managed message queue. Priced per request, with no per-queue or storage fee. Generous free tier.

An aws_sqs_queue is a managed message queue, either Standard (best-effort ordering, at-least-once delivery, highest throughput) or FIFO (strict ordering, exactly-once processing, lower throughput). Pricing has only two variables that matter.

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_requests to c3x-usage.yml for accurate estimates.

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_sqs_queue.

DimensionUnitWhat's being charged
Standard queue requestsper 1M requestsEach API call counts as 1 request. First 1M/month free at account level.
$0.40/1M requests
FIFO queue requestsper 1M requestsFIFO requests are slightly more expensive than Standard. Higher consistency guarantees.
$0.50/1M requests
Data transfer outper GBEgress to public internet. Free within VPC and same-region intra-AWS.
Extended client library payloadsper S3 PUT/GETMessages 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_sqs_queue cost without changing the workload.

Use long polling (receive_wait_time_seconds = 20)

Up to 90% on receive request count

Long 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 requests

ReceiveMessage 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 scale

At 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_requests under the queue in c3x-usage.yml to get an estimate.

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

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_sqs_queue.