Submit feedback on
Continuous Polling of Inactive SQS Queues Generating Empty Receive Charges
We've received your feedback.
Thanks for reaching out!
Oops! Something went wrong while submitting the form.
Close
Continuous Polling of Inactive SQS Queues Generating Empty Receive Charges
Taylor Houck
CER:

CER-0305

Service Category
Other
Cloud Provider
AWS
Service Name
AWS SQS
Inefficiency Type
Unused Resource
Explanation

Amazon SQS does not charge for queue existence, message storage, or the number of queues — cost is driven entirely by API requests and data transfer. When consumers continue polling a queue that no longer receives messages, every ReceiveMessage call that returns empty is billed at the same rate as a call that returns data. These "empty receives" are the most common source of unexpected SQS charges and represent pure waste when the queue serves no active purpose.

This pattern is especially prevalent in serverless architectures where Lambda functions are configured as SQS event sources. In this setup, AWS automatically manages a fleet of pollers that continuously make ReceiveMessage calls to the queue — starting with multiple concurrent pollers and scaling based on message volume. Even on a completely idle queue, this automated polling generates a steady stream of empty receives around the clock. Because the polling is managed by the platform rather than application code, teams often overlook it entirely.

While the cost per individual idle queue may appear modest, the waste compounds quickly across organizations with many queues spanning development, staging, and production environments. The SQS free tier can mask the issue in small deployments, but organizations with dozens or hundreds of forgotten queues — each with active consumers or Lambda triggers — can accumulate meaningful unnecessary spend.

Relevant Billing Model

Amazon SQS billing is based on API request volume, not queue existence or message storage:

  • All API actions — including SendMessage, ReceiveMessage, DeleteMessage, and others — are billed per request, counted in 64 KB increments (a 256 KB payload counts as 4 requests)
  • Empty receives (ReceiveMessage calls that return no messages) are billed at the same rate as requests that return messages
  • Standard queues and FIFO queues are billed per million requests, with FIFO queues carrying higher per-request rates
  • A permanent free tier provides 1 million requests per month across all queues and regions
  • Data transfer into SQS is free; outbound data transfer incurs standard AWS data transfer charges except for transfers to services in the same region

The key billing lever in this pattern is that continuous polling of an empty queue generates a constant stream of billable ReceiveMessage requests with zero functional value. When Lambda is the consumer, AWS manages the polling automatically, and these empty receives accumulate whether or not the queue is in active use.

Detection
  • Identify SQS queues that have had no messages sent or received over a representative period, indicating they may no longer serve an active purpose
  • Review queues with a high ratio of empty receives relative to messages successfully delivered, as this signals consumers polling without productive work
  • Assess whether any serverless function triggers or consumer applications are still attached to queues that are no longer receiving messages
  • Evaluate queues across non-production environments (development, staging, testing) that may have been created temporarily but never decommissioned
  • Confirm with application teams whether queues flagged as idle are still expected to receive traffic or can be safely retired
  • Examine polling configuration to determine whether consumers are using short polling or long polling strategies, as this affects the frequency of API calls on low-traffic queues
Remediation
  • Delete SQS queues that are confirmed to be no longer in use, ensuring that any associated consumer triggers or subscriptions are also removed
  • Disable or remove serverless function triggers on queues that are idle but may be needed in the future, preventing automated polling from generating empty receives
  • Switch consumers from short polling to long polling (up to 20-second wait time) on queues that are still in use but experience low message volume, reducing the frequency of empty receives
  • Establish a periodic review process to identify and flag queues with no recent message activity, prompting teams to confirm continued need
  • Implement automated lifecycle policies or tagging conventions that mark queues with an expected retirement date, making orphaned queues easier to detect
  • Consolidate queues where possible — fewer queues with active traffic reduce the surface area for idle polling waste
Submit Feedback