Lambda explorer
lambda_functions/explorer/
Click through your Lambda functions: what failed, what's running, and why¶
explore() turns a notebook cell into a window on your functions. Every function is listed with how it's doing, the ones that need attention first. Click one for its logs run by run, its errors by cause, its code and every setting. Nothing to type, nothing to remember.
- One install, ipywidgets already on SageMaker
- Read-only: never invokes or changes a function
- Logs run by run, searched in CloudWatch
- What's running now, every few seconds
The examples use acme's functions: orders-etl loads each day's orders from S3 into the warehouse, and report-api serves a sales report over a function URL. The screenshots are the real window in JupyterLab on moto. For reports you run from code (every region, runtimes, how the code works, what changed between versions), see the Lambda guide.

explore(): pick a function, read its failed run, search its logs, then see its errors by cause and its code.
Watch it run¶
Seven steps in a notebook, from every function to what's running right now: 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 LambdaView ui = LambdaView() x = ui.explore() # every function in the notebook's region
Straight to a function, a tab, a time range or another region
from aws_analyzer.lambda_functions import explore
explore() # every function in the notebook's region
explore("orders-etl") # straight to one function: a name, an ARN or a console link
explore("orders-etl", tab="logs") # ...on its logs (or "errors", "performance", "code", "settings")
explore(tab="live") # what's running now, looked at every few seconds
explore(region="all") # every region your account has turned on
explore(region="eu-west-1", profile="dev") # another region or AWS profile
explore(height=800) # 800px pages (else the browser's height)
ui.explore("orders-etl") # from a LambdaView
The top of the window, and without ipywidgets
The top of the window is the region field, the function field and their cards. ⧉ Copy as code beside the region field holds the one call that opens the window as it is now, such as explore('orders-etl', tab='logs', since='3h', search='KeyError'): click it, press Ctrl+C, and paste it in another cell or a message. Once a function is picked, the header shrinks to one line of its numbers over 30 days, so the tabs get the height. When the list loads, the window reads the function at the top of its problems in the background, so the one you're most likely to click opens at once; a function you open again within 5 minutes shows at once too, as the window read it then. ↻ Refresh reads everything again. The region field switches to another region, or to every region at once. Click the function field for every function, with a search box that finds one by its name, description, runtime or region; Enter picks the first, and a function's ARN or console link works too, even one in another region. With no function picked, the cards sum up the region: its functions, their calls and error rate over 30 days (each card names its window), the estimated monthly cost, and how many need attention. With one picked, they're its own. The line at the bottom of the window says what's going on.
The window needs ipywidgets, which SageMaker notebooks already have (elsewhere, %pip install ipywidgets, then reload the browser tab). Without it, or outside Jupyter, explore() shows the same as reports: functions(), or for one function function_info() or the report of the tab you asked for.
Start here¶
Six things to try in your first minute. Nothing you click invokes, changes or deletes a function.
What's wrong
- Which functions need attention? Read the Functions tab, problems first
- Why did this run fail? Click a function, then Logs, then a ✕ run
- Which runs logged this error? Type it in the Logs search box, press Enter
- What are its errors, by cause? Open the Errors tab
- What happens if I run it now? Logs, then ▶ Invoke
Right now, and since last time
- What's running at this moment? Open the Live tab
- What changed since I last looked? Click the Changed chip
Every function¶
The Functions tab puts the functions that need attention first. A dot says how each is doing: red when its calls fail often enough to act on, amber when it has a warning, green when all is well, hollow when nothing called it in 30 days.

Functions: every function with its last 14 days, what's wrong with it, its calls, error rate, run time and cost, the ones that need attention first.
Under a function that needs attention, its line says what's wrong ("3 of 120 calls failed (2.5%) in the last 30 days") in place of its description, and Last 14 days draws its calls a day, the failed part in red, so a function that started failing this week stands out from one that always fails a little. Click that column's header to put the ones failing most in the last 3 days first.
Search by name, description, runtime, region or trigger (sqs), click a chip for only the failing, old or public ones, and click Logs on a line to go straight to its logs.
Recent shows only the functions you've opened before, the ones you open most and most lately first, and the function field lists them first, each saying when you last opened it. The window remembers them between sessions, per AWS account: only their ARNs and when, in ~/.cache/aws-analyzer/history/places.sqlite, which clean_up() keeps. x.recent lists them, x.forget_recent("orders-etl") forgets one and x.forget_recent() every one. explore(history=False) remembers nothing, and AWS_ANALYZER_HISTORY=off turns it off for every explorer.

Recent: the functions you've opened, in this session or an earlier one.
Changed shows the functions you've opened before whose code or settings changed since, or whose errors went up, each tagged changed in the list. Open one, and its Overview says what: when the new code was deployed, which settings moved, and its failed calls a day against the days before your last look. Its Errors tab names the errors it hadn't seen when you last opened it.

Changed: the functions that are different from when you last looked.

What changed in orders-etl since three days ago, among its findings.
How it decides what changed
When you open a function, the window notes its code's SHA-256, when it was deployed, its runtime, handler, memory and timeout, and, once you open its Errors tab, a hash of each error's cause (never the message). Next time, it compares. Looks within an hour of each other are one visit. Failed calls come from CloudWatch, which counts whole UTC days, so they're counted from the day after your last look, and not until a whole day has passed; they've gone up when there are at least 3 and twice as many a day as before.
What's running now¶
The Live tab shows what's running right now: every function that ran in the last 10 minutes, the ones with runs in progress first, looked at again every few seconds.
Each line says how many runs are going and what the newest one is doing, its calls a minute (the failed part in red), and when it last logged. A run turns amber as it nears its timeout. Click a function to follow it: its runs, newest first, the ones still going open at the top with their lines added as they come. ‹ All functions goes back, and Its Logs tab › opens the function's Logs tab for a longer time range or a search.
explore(tab="live") # what's running now
explore("orders-etl", tab="live") # ...following one function
x.live("orders-etl") # the same, in a window that's open

explore(tab="live"): three functions ran in the last 10 minutes, two of them running now.

Following orders-etl: its run going, near its timeout, its lines as they come.
How it knows what's running
Lambda has no call that lists the runs in progress, so the tab puts two reads together. Once a minute, CloudWatch's numbers (GetMetricData: calls, failed calls and runs at once, a value a minute) say which functions ran; they come a minute or two late. Every 5 seconds, the newest lines of the five busiest (FilterLogEvents) say which runs are going: Lambda writes a START line when a run begins and a REPORT line when it ends, so a run with a START and no REPORT yet, younger than its timeout, is running. A function you follow has its lines read whether CloudWatch counted it or not.
It watches while the tab is open, for 15 minutes at most; click Live to stop or start again. The status line says what the numbers cost: three metrics a function a minute, at $0.01 per 1,000 (a hundred functions for 15 minutes is about $0.05). Nothing is invoked or changed.
Logs, run by run¶
The Logs tab is CloudWatch grouped the way you think about it: one line per run, ✓ or ✕, newest first. Click a run to read every line it logged.
Each run shows how long it ran against the timeout, the memory it used, a cold start, and what made it fail. Times are in UTC, or in the zone set_timezone() picked.

Logs: orders-etl's last 24 hours, run by run, with a failed run open: its traceback, and its REPORT line summed up.
The time range, searching CloudWatch, the chips and Live
- The time range, from the last 15 minutes to the last 30 days (the last hour at first), or Custom range…: pick From and To on a calendar (in the reports' time zone; leave To empty for up to now) and click Show runs, to read last Tuesday's 09:00 to 17:30. Errors and Performance start at the last 24 hours; once you pick a range in any of the three tabs, the others follow it, a custom range too. While a range is read, a bar fills as it goes, with how far back it has read and the lines found so far. The newest 3,000 lines are read; when the range holds more, the line over the runs says these are the newest runs, and Older runs under the list reads further back. A range with nothing in it says when the function last logged, and a button picks a range that reaches it.
- The time range also has Today: from midnight, in the reports' time zone.
- The search box finds runs as you type: an order ID,
KeyError, a request ID, in any case, among the runs read. Enter asks CloudWatch to search the whole time range, and brings back each run with a matching line whole, the matching lines marked. A CloudWatch Logs filter pattern (?ERROR ?WARN,{ $.level = "ERROR" }) works too, with Enter. ✕ shows every run again. - Join words with AND, OR and NOT, in capitals:
KeyError OR Timeout,PutItem AND NOT retrying(orPutItem -retrying),(AccessDenied OR Throttling) AND order-42. A run matches when its lines hold them, on one line or several, so an order ID logged on one line and the error on the next still find the run. The words show as chips under the box: click the OR between two of them to make it AND (and back), click a word to leave out the runs that have it, and its ✕ takes it away; each click rewrites the box. Lowercase and and or are words, so a pasted message such asNo such file or directoryis still one phrase, and quotes keep a phrase together:"not authorized" OR Throttling. Enter asks CloudWatch for the lines with any of the words, reads each of their runs whole, then keeps the runs that match the whole search; it keeps the newest 500 lines that matched, and the line at the bottom says when a search reached that. - The same box asks for runs by their fields: type
duration > 15s,duration > 15s and cold,memory_share > 80%,error ~ KeyErrororstarted > 14:00, and the list keeps the runs read that match, asruns(where=...)does. Fields your JSON logs carry work too, and so does the event when the function logs it (size > 30MB). The line under the tabs says how many match, or the field you likely meant when no run has the one typed. Put words in quotes to search for them instead. With an agent (explore(..., assistant=AgentView(...))), ✦ beside the box takes plain English instead: "slow runs that started cold", then Enter, and the agent writes the query for you to use (the agent's guide). - The sort menu beside the chips lists the runs newest first, oldest first, longest first or most memory first.
- A run that logged its event shows it at the top of its lines, as JSON to fold. Lambda never logs the event itself, so it's there only when the code does (Powertools:
@logger.inject_lambda_context(log_event=True)). - The chips show only the runs that failed, timed out, logged an error (and may have handled it) or were cold starts.
- A dashed line across the runs marks when the function was last changed (its code or settings): the runs under it ran it as it was before.
- The timeline over the runs is a bar for each thirtieth of the time read, as tall as the runs that started in it and red where some failed. Click a bar for only those runs, and again for every run.
- Slowest 10% shows the runs that took the longest (with 10 runs or more read).
- An open run has its request ID and a CloudWatch Logs Insights query for it to copy (click, then Ctrl+C), and ↗ Open in the AWS console, its log stream filtered to that run.
- A failed run's traceback (Python's
File "/var/task/etl.py", line 22, or a Node.js stack) gets a button under its lines that opens that file in the Code tab, the lines around the failing one at the top and that line shaded in the whole file below. Frames in libraries the package bundles are skipped for the function's own code. - Live looks for new lines every 5 seconds and puts the new runs at the top, to watch a function while you test it. It stops when you leave the tab, and after 15 minutes.
The line over the runs sums up the ones shown: how many, how many failed, the median and slowest run time against the timeout, the most memory used, and the cold starts.

AccessDenied, searched in CloudWatch: two runs in the last 24 hours, each brought back whole, the matching line marked.
Logs in JSON (a function whose log format is JSON) show each line's message, with its other fields a click away. An error the runtime logged in JSON reads like a traceback: its type, its message, then its stack.

report-api logs JSON: each line's message, its level, and its other fields a click away.
Run it and see its logs¶
▶ Invoke at the end of the Logs tab's bar runs the function once with an event you write, and puts that run first among the others, opened.
The box starts with the event you sent last, or the newest one a run logged, and says as you type whether it can send it. ▶ Run sends it. The run comes back marked you ran, with what was sent and what it returned side by side above its lines, and what to change when it failed or came close to its memory or timeout. The last 4 KB of its log arrive with the answer, so there's nothing to wait for; a longer log is read whole from CloudWatch Logs as soon as it gets there.

▶ Invoke on orders-etl: the run it made is first, opened, with what was sent and what came back.
Running it again, dry runs, and what it needs
- ▶ Invoke with this event sits under any open run whose event is known (the one you sent, or one the code logged). It puts that event in the box, so replaying a real call takes two clicks. Nothing runs until you click ▶ Run.
- Dry run only asks Lambda whether you may invoke the function. Nothing runs.
- The You ran chip shows only the runs you made from the window. They stay first when the time range is read again, even before CloudWatch has their lines. Running it while a search is in the box clears the search, so your run shows.
- It runs for real: whatever the code writes, sends or deletes happens. It's sent once and never retried, even when the answer is slow, so it never runs twice. It needs
lambda:InvokeFunctionon the function, on top of the read-only permissions; without it, the box says so. In a cell,ui.invoke(name, event)draws the same as a report.
How it's doing¶
The Overview tab has what to fix first, then how it's wired: what calls the function and where its results, failed events and logs go. Then its days as charts (calls, failed calls on their own scale, run time against the timeout) and its cost as one bar.
A failure destination it doesn't have shows in amber. Then its calls a day over 30 days, the failed part in red, its run time a day against the timeout, and what it costs. A dashed line on both charts marks the day it was last changed (its code or settings), and when its calls began to fail after that, a warning says so, with how many failed before and since.

Overview, under the findings: failed S3 events go nowhere, its logs are kept forever, and its failed calls jumped the day after it changed.
Errors, run times, code and settings¶
The other tabs are the Lambda guide's reports, a click away: Errors is errors(), Performance is performance(), Code is the package as a tree you click through, and Settings is every setting in plain English.
What each of those tabs does
- Errors is
errors(): the errors in its logs grouped by cause, each a line to click for the runs it failed in (the Logs tab, searched for it over the same time range), then what to do about each, then the newest failed runs. Click one to read every line of it in the Logs tab. Code › on a cause opens, in the Code tab, the line of the function's own code its traceback names. - Performance is
performance(): run times against the timeout, the memory used against what it has and the size that would do, cold starts, and the slowest runs, each a click from its lines. - Code downloads the deployment package once and shows its files as a tree of folders, folders first, with the handler's folder open (a folder that holds only a folder shares its line, as
botocore/data/does). Click a folder to open or fold it, and a file to see its source, with line numbers, and Python and JSON in colour; Copy beside its name selects all of it, so Ctrl+C (⌘+C on a Mac) copies the file. Typing in Find a file shows only the files that match, in their folders. Hide files folds the tree away so the source has the whole width, and Show files brings it back (it stays hidden for the next function you open). For a Python function, How it works shows how its code works in place of the source: the graph of what calls what, the steps of a call from the handler on, its AWS calls, the environment variables and event fields it reads, and what to fix; click it again, or a file in the tree, for the source. While it's shown, ↗ Open in a tab saves it as a page of its own, likehow_it_works_page(), with the link that opens it under the buttons. Download .zip saves the package, the .zip as Lambda stores it, inlambda-downloads/next to the notebook, likedownload(). A secrets file (.env, keys) is listed but its text isn't shown, and a package over 50 MB is downloaded only when you click Download it anyway. - Settings has every setting in plain English, then the configuration as Lambda returns it, folded (open it for the JSON in colour, where a click on an object or a list folds it, and hovering over a line shows its path in
raw), and the AWS CLI commands that read it. Environment variable values never appear.
The Errors and Performance tabs read the last 24 hours at first. Once you pick a time range in the Logs, Errors or Performance tab, all three read that range.

Errors: three causes, each a click from the runs it failed in, then what to do about each.

Code › on a cause, or the button under a failed run: the line its traceback names, in the package's own code.

Code: the package as a tree of folders, the handler's source to copy, and a .env file that shouldn't be in the package.
That's the guide. Everything below is reference for when you need it: driving the window from code, and every command.
From code¶
The window is an object you can drive: what a click does, a command does too, and what's shown is data you can read.
Everything is read in the background: a click shows what's known at once and fills in the rest as it arrives, and the window keeps answering meanwhile. explore() returns the window: x.overview, x.function, x.detail, x.logs_page, x.package, x.code_map (what How it works read) and x.saved (what Download .zip saved) hold the data behind what's shown, and x.focus is what you're looking at (the function, the tab, its time range and the run or file opened; x.focus.chips() reads it as a row of chips); x.open("report-api"), x.logs(search="KeyError", since="24h") (or x.logs(since="2026-10-27 09:00", until="2026-10-27 17:30") for a custom range), x.run("c0ffee00-1d2e-4f3a-9b8c-7d6e5f4a3b2c") and x.refresh() do what the clicks do; and x.ui is a LambdaView for reports in other cells. With explore(..., assistant=AgentView(...)) (or x.attach(agent)), ✦ Ask at the end of the tab bar opens the agent's chat beside the tabs, asking about the function, run or file you have open (the agent's guide).
Command reference¶
| Command | What it does |
|---|---|
explore(name=None, tab=None, since=None, until=None, search=None, region=None, profile=None, height=None, history=True, assistant=None) |
Opens the window and returns it; ui.explore(...) on a LambdaView takes the same |
x.open(name, tab=None) |
Opens a function (a name, "name:alias", an ARN or a console link), on its Overview or tab= ("logs", "errors", "performance", "code", "settings") |
x.logs(name=None, search=None, since=None, until=None) |
Its Logs tab, for a time range ("15m", "24h", "7d", a date) and a search, as typing it and pressing Enter does |
x.run(request_id) |
One run, every line of it, by its request ID |
x.live(name=None) |
The Live tab: what ran in the last 10 minutes, or one function followed |
x.recent / x.forget_recent(name="") |
The functions you've opened before; forget one, or all of them |
x.refresh() |
Reads everything again (the ↻ button) |