CloudWatch Metric Guide
ApproximateNumberOfMessagesNotVisibleAmazon SQS CloudWatch metric
ApproximateNumberOfMessagesNotVisible reports the number of messages currently in flight — received by a consumer and hidden from other consumers for the duration of the visibility timeout, but not yet deleted.
What it measures
About ApproximateNumberOfMessagesNotVisible
ApproximateNumberOfMessagesNotVisible reports the number of messages currently in flight — received by a consumer and hidden from other consumers for the duration of the visibility timeout, but not yet deleted.
| Namespace | AWS/SQS |
| Metric name | ApproximateNumberOfMessagesNotVisible |
| Unit | Count |
| AWS docs | Official Amazon SQS metrics reference |
Why this metric matters
This metric is the diagnostic that separates "consumers are receiving but not finishing" from "consumers aren't receiving at all." A healthy queue under load has messages continuously moving into the not-visible state and back out (deleted or returned) as the visibility timeout cycle runs. A queue where this count is high and stays flat — not oscillating — usually means consumers picked messages up but never called DeleteMessage, so they'll sit invisible until the visibility timeout expires and they reappear in the visible count.
That pattern is a specific, common failure mode: a consumer crashes or times out mid-processing after receiving a message but before deleting it. The message isn't lost, but it's stuck in a cycle of being received, timing out, and being received again — invisible to observers who are only watching ApproximateNumberOfMessagesVisible.
Recommended alarm threshold for ApproximateNumberOfMessagesNotVisible
Recommended threshold
Flat and elevated for longer than your configured VisibilityTimeout, rather than a fixed count
There's no universal healthy count for in-flight messages — it scales with consumer concurrency. The useful signal (ConvOps recommendation) is the pattern, not the number: if this count stays elevated for longer than the queue's own VisibilityTimeout, messages that should have cycled back to visible or been deleted are stuck, which points directly at consumers receiving without deleting.
Is your ApproximateNumberOfMessagesNotVisible alarm already set up correctly?
The free Nuberio Audit scans your CloudWatch setup and flags missing or misconfigured alarms — including ApproximateNumberOfMessagesNotVisible — in 5 minutes.
Common failures that show up in ApproximateNumberOfMessagesNotVisible
When ApproximateNumberOfMessagesNotVisible reaches an alarm threshold, these are the most common root causes — in order of how often Nuberio sees them across customer AWS accounts.
Consumer crashes after receiving, before deleting — an unhandled exception or process crash mid-processing leaves the message in flight until the visibility timeout expires
Visibility timeout set too short for actual processing time — consumers are still working when the timeout expires, so the message becomes visible again and gets received a second time while the first attempt is still running
Consumer hung on a downstream call with no timeout — a database or API call that never returns holds the message in flight indefinitely
Batch receive with partial processing failure — a consumer receives multiple messages in one call, processes some, but an error prevents deleting the rest
How the Nuberio Audit checks ApproximateNumberOfMessagesNotVisible
The free Audit scans every Amazon SQS resource in your account and checks whether a ApproximateNumberOfMessagesNotVisible alarm exists, whether its threshold and evaluation period are configured sensibly, and flags it if it's missing entirely. Every finding comes with the exact CLI command to fix it — read-only access, no credit card, results in about 5 minutes.
Nuberio Audit
Scans your CloudWatch setup for missing or misconfigured ApproximateNumberOfMessagesNotVisible alarms. Free, 5-minute read-only scan.
Related Amazon SQS metrics
ApproximateNumberOfMessagesNotVisible rarely fails in isolation. These metrics tend to correlate — monitor them together for complete Amazon SQS coverage.
FAQ
Frequently asked questions about ApproximateNumberOfMessagesNotVisible
Common questions about setting up CloudWatch alarms for ApproximateNumberOfMessagesNotVisible in Amazon SQS.
What is the recommended CloudWatch alarm threshold for ApproximateNumberOfMessagesNotVisible?+
Flat and elevated for longer than your configured VisibilityTimeout, rather than a fixed count. There's no universal healthy count for in-flight messages — it scales with consumer concurrency. The useful signal (ConvOps recommendation) is the pattern, not the number: if this count stays elevated for longer than the queue's own VisibilityTimeout, messages that should have cycled back to visible or been deleted are stuck, which points directly at consumers receiving without deleting.
Which CloudWatch namespace does ApproximateNumberOfMessagesNotVisible belong to?+
ApproximateNumberOfMessagesNotVisible is published in the AWS/SQS namespace with a unit of Count. You can find it in the CloudWatch console under "Metrics" → "AWS/SQS". See the Amazon SQS CloudWatch metrics reference in the AWS documentation.
Does Nuberio automatically create CloudWatch alarms for ApproximateNumberOfMessagesNotVisible?+
No — the free Nuberio Audit does not create alarms for you. It scans your CloudWatch setup and tells you which Amazon SQS resources are missing a ApproximateNumberOfMessagesNotVisible alarm, then gives you the exact CLI command to create it yourself.
Can I use Nuberio without already having a ApproximateNumberOfMessagesNotVisible alarm set up?+
Yes. The free Audit works whether or not you have any ApproximateNumberOfMessagesNotVisible alarm configured — it reads the resource directly from CloudWatch and tells you which resources need one, plus the copy-paste AWS CLI command to create it.
This page is part of the CloudWatch metric guide — thresholds and debugging guidance for every metric across RDS, Lambda, ECS, ALB, EC2, and DynamoDB. To find which Amazon SQS alarms your account is missing — including ApproximateNumberOfMessagesNotVisible — run the free CloudWatch alarm audit. The scan takes under 5 minutes and requires no account.