Weekday morning Amazon SQS queue health digest in Slack

By General Input

Every weekday at 8am, scan every Amazon SQS queue in your region, flag the ones backing up or filling a dead-letter queue, and post a grouped digest to Slack.

Integrations

  • Amazon SQS
  • Slack

Type

Agentic Task

Categories

  • Operations
  • Engineering

Every weekday at 8am, run a morning Amazon SQS health digest and post it to a Slack channel the user picks at setup. The trigger is a cron schedule the user can adjust (day of week, hour, timezone).

Start by calling Amazon SQS List Queues to enumerate every queue in the configured AWS region. If a queue-name prefix is provided at setup, pass it as the filter; otherwise list everything in the region.

For each queue URL returned, call Amazon SQS Get Queue Attributes and read ApproximateNumberOfMessages (visible backlog), ApproximateNumberOfMessagesNotVisible (in-flight messages consumers are working on), ApproximateAgeOfOldestMessage (how long the oldest message has been waiting), and RedrivePolicy (whether the queue targets a dead-letter queue). Use RedrivePolicy together with the queue name to tell whether the queue is itself a dead-letter queue or has one configured downstream.

Classify each queue as healthy, backing up, or DLQ-populated. A queue is DLQ-populated when it looks like a dead-letter queue (name suffix like -dlq or -deadletter, or it is referenced as the deadLetterTargetArn in another queue's RedrivePolicy) and it currently has any messages in it. A queue is backing up when its visible message count or its oldest-message age crosses a threshold the user can tune (defaults: more than 1,000 visible messages, or an oldest message older than 15 minutes). Everything else is healthy.

Rank the concerning queues first: DLQ-populated queues at the top, then backing-up queues sorted by oldest-message age descending. Group healthy queues into a single compact roll-up at the end so on-call sees the concerning items immediately.

Post one grouped digest to the chosen Slack channel using Slack Send a Message. Use clear severity emoji at the start of each line (🚨 for DLQ-populated, ⚠️ for backing up, ✅ for the healthy roll-up), and for each concerning queue show the queue name, visible message count, in-flight count, and the age of the oldest message. Underneath each hot queue add one short plain-English sentence explaining what those numbers mean so an on-call engineer can act fast — for example, ‘12,400 messages waiting and the oldest is 42 minutes old, so consumers are draining slower than producers are publishing’, or ‘423 messages sitting in the dead-letter queue, meaning downstream processing has been failing repeatedly and needs investigation before retention expires’.

If List Queues returns no queues at all, still post a single friendly note to the Slack channel saying no queues were found in the region so silence is never ambiguous.

Related prompts

Explore more prompts
Call overdue Xero customers with an AI collections agentWin back LiveChat visitors whose chats went unansweredChat quality review board for LiveChat support leadsWin back no-show and cancelled appointments every morningLive Loop returns analytics with product-level drill-downNewsletter pre-flight and approval board for Mailjet sendsTurn a prospect spreadsheet into personalized sequence enrollmentsMailjet email delivery lookup console for support teamsCatch feature flags that never got switched on in productionKajabi customer support console for member access fixes