Messaging explorer
messaging/explorer/
Click through your queues, topics and rules, and follow a message¶
explore() turns a notebook cell into a window on SQS, SNS and EventBridge. The failed messages come first; click a queue, topic or rule for its report, follow its messages on a map whose hops you click, or watch a queue drain.
- One install, ipywidgets already on SageMaker
- Read-only: never receives a message
- SQS, SNS and EventBridge in one map
- A queue's backlog, live
The examples use acme's orders-events topic, which delivers to four queues and a Lambda function, and the shop event bus, whose order-placed rule sends big orders to an audit queue and a fraud check. Some of those deliveries fail, and 42 orders wait in a dead-letter queue. For reports you run from code, see the messaging guide.

msg.explore(): from what failed, to where a topic's messages go, to a queue draining as you watch.
Watch it run¶
Four steps in a notebook, from everything in the region to a queue draining: each command typed and run, and the window it shows, with what to notice. It plays as you scroll to it; click it to pause, or pick a chapter to jump to a step.
Full screen · Download as MP4, for Slack or a slide (light or dark, as this page is)
Open it¶
-
Install it in a notebook cell:
%pip install aws-analyzer -
Open the window. It uses the notebook's IAM role and region, so there's nothing to configure.
from aws_analyzer import MessagingView msg = MessagingView() x = msg.explore() # a dead-letter queue holding messages first, else the most problems
Straight to a queue, topic or rule, or a tab
msg.explore() # a dead-letter queue holding messages first, else the most problems
msg.explore("orders-events", tab="map") # straight to where a topic's messages go
msg.explore("email-jobs", tab="live") # watch a queue's backlog
A queue is named by its name, URL or ARN, a rule as "bus/rule". tab= is one of "overview", "map", "dead" and "live", and days= the window of the numbers (7 by default). region=, profile= and height= work as for the reports. The window needs ipywidgets, which SageMaker notebooks already have; without it, or outside Jupyter, explore() shows the reports instead.
Start here¶
Four things to try in your first minute. Nothing you click receives, sends or deletes a message.
What's wrong
- What needs attention? Read the Everything tab, problems first
- Which failed messages are waiting? Open the Dead letters tab
Follow it
- Where did my message go? Click the topic or rule, then Map
- Is this queue draining? Click the queue, then Live
Everything at once¶
The Everything tab is every queue, topic and EventBridge rule in the region, a line each, the ones that need attention first.

msg.explore(): every queue, topic and rule, the ones that need attention first; search them, pick a chip or click a column to sort.
Each line has what came in, what failed, what waits and its problems. Search by name, click a chip for only the ones with Problems, the Queues, the Dead-letter queues, the Topics or the Rules, and click a column's header to sort by it. A dead-letter queue holding messages sorts first.
The field at the top switches to another queue, topic or rule, and its cards say how that one is doing. Overview is its report, with the commands that fix what's wrong. The Map tab is follow() as lines you click: a queue, topic or rule on the way opens there, and the map follows it.
Where its messages go¶
The Map tab follows a queue's, topic's or rule's messages hop by hop, to the function that reads them; click a hop to open it.

The Map tab: where orders-events' messages go, and the two queues that keep them out.
It's follow() as lines you click: a hop marked red is a delivery that fails, or a queue whose policy keeps the sender out.
Dead-letter queues¶
The Dead letters tab lists every dead-letter queue, the fullest first, with what it catches failures from; click one to open it.

The Dead letters tab: orders-dlq holds 42 failed orders, and the command that moves them back once the cause is fixed.
Live¶
The Live tab looks at a queue every 5 seconds while it's open: how many messages wait, and when the backlog would be empty.
Live looks at the queue open (else the fullest few) every 5 seconds while its tab is open: how many messages wait, a bar per look, and which way the backlog is going, with when it would be empty.

Live: email-jobs draining after its reader was turned back on.
Worth knowing
Each look Live takes is one GetQueueAttributes request per queue it watches, billed like any SQS request ($0.40 per million). The line above the cards says what an hour of watching costs, and Live stops by itself after 10 minutes, or when you leave its tab.
That's the guide. Everything below is reference for when you need it: how the window reads, and every command.
From code¶
The window is an object you can drive: what a click does, a command does too.
x = msg.explore()
x.open("orders-events", tab="map") # another queue, topic, rule ('bus/rule') or bus, on a tab
x.watch() # the Live tab, on the queue open (else the fullest few)
x.refresh() # read everything again (the ↻ button)
How the window reads
Everything is read once, off the notebook's event loop, so a click returns at once: the queues, topics, rules and their CloudWatch numbers first, then the one you open, in full. The Map and Dead letters tabs are drawn from what's read, with no more requests. Pick another one while one is still being read and the first one's result is dropped when it comes back. Outside Jupyter, explore() shows the reports instead.
Command reference¶
| Command | What it does |
|---|---|
explore(where=None, tab=None, region=None, profile=None, days=7, height=None) |
Opens the window and returns it; msg.explore(...) on a MessagingView takes the same |
x.open(where, tab=None) |
Shows another queue (name, URL or ARN), topic, rule ("bus/rule") or bus, on tab when one is named |
x.watch() |
Opens the Live tab and watches the queue open, else the fullest few |
x.refresh() |
Reads everything again (the ↻ button) |