# AWS Lambda

ARNscope puts a Lambda function's metrics, logs, configuration, triggers, versions, code and test events on one page. When something is wrong and you don't know where, **Fleet triage** ranks every function across your profiles and regions by how much it is on fire. From a function, **Error groups** gathers its errors by message, and one click opens an invocation with its log lines, its `REPORT` line and its X-Ray trace.

Reading is free of side effects. Invoking a function and changing its settings are writes: they need **Writes** on for the profile and region, and each one asks first. See [Writes and confirmations](https://arnscope.com/docs/writes).

<figure class="doc-video">
<video controls playsinline preload="none" poster="/media/docs/lambda/lambda-triage-explainer.webp?v=1" aria-label="Which Lambda is on fire? A narrated walkthrough of 84 seconds">
<source src="/media/docs/lambda/lambda-triage-explainer.webm?v=1" type="video/webm">
<source src="/media/docs/lambda/lambda-triage-explainer.mp4?v=1" type="video/mp4">
<track kind="captions" srclang="en" label="English" src="/media/docs/lambda/lambda-triage-explainer.vtt?v=1" default>
</video>
<figcaption>Which Lambda is on fire? 84 seconds, narrated, with captions: Fleet triage across three profiles and three regions, the top function opened on the same hour, its error group, then one invocation's X-Ray trace with the card gateway's 504. Sample data.</figcaption>
</figure>

## Functions

Open **Lambda** in ARNscope. The page uses the profile and region in the title bar; change the region there to see another region's functions. The list shows every function with its runtime and version, and on the right its invocations and error rate over the last 24 hours, from CloudWatch metrics. Type in the filter to narrow the list by name, description or tag. **Fleet triage** sits at the top of the list.

<figure class="doc-clip">
<video data-clip controls muted loop playsinline preload="none" poster="/media/docs/lambda/lambda-list.webp?v=1" aria-label="The function list with each function's invocations and error rate over the last day, filtered to payment, then payment-authorize opens.">
<source src="/media/docs/lambda/lambda-list.webm?v=1" type="video/webm">
<source src="/media/docs/lambda/lambda-list.mp4?v=1" type="video/mp4">
</video>
<figcaption>Each function's invocations and error rate over the last day, and a filter by name.</figcaption>
</figure>

Select a function to open it. The header shows its description, the version or alias picker, **Tail function**, the Writes switch and **Test**. Under it a strip shows the runtime, memory, timeout, architecture, version and code size. The tabs are **Monitor**, **Configuration**, **Connections**, **Versions**, **Code** and **Test**.

## Fleet triage

**Fleet triage** answers "which function is on fire right now?" across every profile and region you pick. It reads the function lists and one batched metrics call per region, scores each function on errors, throttles, calls near the timeout and a p95 slowdown against the window before, and ranks them hottest first. The cost of the metrics read is shown before it runs, and it never polls. Click a row to open that function's Monitor tab on the same time window.

<figure>
<img src="/media/docs/lambda/lambda-fleet.webp?v=1" alt="Fleet triage over three profiles and three regions: payment-authorize in fernwood-prod scores 60 with 388 errors and a p95 1.9 times slower, ml-batch-scorer in fernwood-sandbox 50, report-export in fernwood-staging 41 near its timeout; one profile-region is listed as access denied above the table." loading="lazy" decoding="async">
<figcaption>36 functions in 3 profiles × 3 regions, ranked by on-fire score; the region a role can't list says so above the table. Sample data.</figcaption>
</figure>

The score, the cost and what is read are explained in [Lambda fleet triage](https://arnscope.com/docs/lambda-fleet-triage).

## Versions and aliases

The **version or alias picker** in the header (it shows `$LATEST` by default) chooses what the page looks at. Pick a published version or an alias, and Configuration, Connections, the metrics, the log search, cold starts and Test all follow it. Each tab then says in a line under the tabs what it is showing, for example "Showing version 4 (90%); 5 (10%) …" for an alias that splits traffic.

What the metrics count depends on the choice:

| Picked | Metrics count |
| --- | --- |
| `$LATEST` | Every call to the function, all versions and aliases (AWS publishes no `$LATEST`-only series) |
| An alias | Every call through the alias |
| A version reached through an alias | The alias's calls that ran that version (the `ExecutedVersion` dimension). Throttles and concurrency are not split by version, so those tiles are empty |
| A version called directly | Direct calls to that version only; calls through an alias are not included |

For a version, the log search and cold starts read only the log streams that version wrote.

The **Versions** tab lists:

- **Aliases**, with a bar for each one's routing (for example `4` 90% and `5` 10% for a canary) and its description.
- **Provisioned concurrency**, per alias or version: requested, allocated and available, and its status (**Allocating…**, **Ready** or **Failed**).
- **Versions**, newest first, with the aliases on each, the description, runtime, code hash, size and when it was published. **Select** on any row points the page at it.
- **Compare configuration**: pick two qualifiers and **Compare** lists the settings that differ. Environment variables compare by key name only; values never leave the Configuration tab.

<figure>
<img src="/media/docs/lambda/lambda-versions.webp?v=1" alt="The Versions tab of order-validate: the prod alias routes 90% to version 4 and 10% to version 5, staging routes to version 5, prod has 20 provisioned concurrent executions Ready, and six versions are listed with their aliases." loading="lazy" decoding="async">
<figcaption>Aliases with their routing, provisioned concurrency and every version. Sample data.</figcaption>
</figure>

With Writes on, the same tab publishes a version, creates, edits and deletes aliases, and adds or removes provisioned concurrency. See [Change settings](#change-settings).

## Metrics and cold starts

**Insights** sits at the top of the Monitor tab. It shows, for the chosen time range, a tile and a small chart for each of:

| Tile | What it shows |
| --- | --- |
| **Invocations** | Total invocations and peak concurrency |
| **Errors** | Errors and the error rate |
| **Throttles** | Throttled invocations |
| **Duration** | p95, with p50, p99 and the average |
| **Concurrency** | Maximum concurrent executions |
| **Cold starts** | Count and share of invocations, with the average and maximum init duration |

Invocations, errors, throttles, duration and concurrency come from CloudWatch's `AWS/Lambda` metrics. Cold starts come from a Logs Insights query over the function's `REPORT` lines; that query scans the log group and is billed per GB, so the line under the tiles says how many records and bytes it scanned. Click **Insights** to fold the tiles away.

<figure class="doc-clip">
<video data-clip controls muted loop playsinline preload="none" poster="/media/docs/lambda/lambda-insights.webp?v=1" aria-label="The Insights tiles for payment-authorize: invocations, errors, throttles, duration percentiles, concurrency and cold starts, then the time range changes to the last hour.">
<source src="/media/docs/lambda/lambda-insights.webm?v=1" type="video/webm">
<source src="/media/docs/lambda/lambda-insights.mp4?v=1" type="video/mp4">
</video>
<figcaption>Invocations, errors, throttles, duration percentiles, concurrency and cold starts, for one time range.</figcaption>
</figure>

The time range (the last 15 minutes up to 7 days, or a custom range) drives both the metrics and the log search below them. The refresh button reads the metrics again and only log events newer than those shown; cold starts are counted again on a manual refresh only, since each count is billed.

## Log search

**Log search** has two views: **Search** and **Error groups**.

**Search** reads every stream in the function's log group for the time range, newest first, and groups the lines by invocation: each group shows its request ID, when it started, its duration, how many lines it wrote, and chips for a cold start, errors or warnings. Expand a group to read its lines; JSON lines can be opened formatted.

- Type a CloudWatch filter pattern, such as `?ERROR ?Exception` or `{ $.level = "error" }`, and press **Search**.
- **Quick filters** set a pattern in one click: **Errors**, **Timeouts** (`Task timed out`), **Cold starts** (`REPORT` lines with an init duration), **Throttles / OOM** (runtime exits and out-of-memory errors) and **Reports** (one summary line per invocation).
- Paste a **Request ID** to see every line one invocation wrote, or click **Show all lines for this invocation** under a group. **Open invocation, report and trace** opens the invocation view described below.

<figure class="doc-clip">
<video data-clip controls muted loop playsinline preload="none" poster="/media/docs/lambda/lambda-log-search.webp?v=1" aria-label="Log search grouped by invocation; the Errors quick filter shows the failed card authorizations, then Cold starts shows the invocations with an init duration.">
<source src="/media/docs/lambda/lambda-log-search.webm?v=1" type="video/webm">
<source src="/media/docs/lambda/lambda-log-search.mp4?v=1" type="video/mp4">
</video>
<figcaption>The log group's lines, grouped by invocation, with quick filters for errors and cold starts.</figcaption>
</figure>

<figure class="doc-clip">
<video data-clip controls muted loop playsinline preload="none" poster="/media/docs/lambda/lambda-request-id.webp?v=1" aria-label="A request ID typed into the Request ID field: the search shows only that invocation's lines.">
<source src="/media/docs/lambda/lambda-request-id.webm?v=1" type="video/webm">
<source src="/media/docs/lambda/lambda-request-id.mp4?v=1" type="video/mp4">
</video>
<figcaption>One request ID, every line that invocation wrote.</figcaption>
</figure>

A search reads up to 500 events at a time; when more match, **Load more** reads the next page.

### Error groups

**Error groups** reads the lines that look like errors in the time range and groups them by message, with request IDs, numbers and other values in the message ignored, so a thousand timeouts with different IDs are one row. It finds timeouts, out-of-memory exits, `Runtime.*` errors, uncaught exceptions and lines logged at `ERROR`, `FATAL` or `CRITICAL`.

Each row shows the kind (**Timeout**, **Out of memory**, **Runtime**, **Uncaught** or **Logged**), the message, a small chart of when it happened across the range, how many invocations hit it and when it was last seen. Expand a row for its first and last time, its error type, the latest full message and the request IDs that hit it, newest first. When CloudWatch's read budget runs out before the whole range is read, **Load older** keeps going back in time.

<figure>
<img src="/media/docs/lambda/lambda-error-groups.webp?v=1" alt="Error groups for payment-authorize over the last 3 hours: one Uncaught group, PaymentProvider.Timeout: Card gateway did not respond within n ms, hit by 10 invocations, expanded to show its type, latest message and the request IDs, each with Open." loading="lazy" decoding="async">
<figcaption>Errors grouped by message, with the invocations that hit each one. Sample data.</figcaption>
</figure>

### From an error to its trace

**Open** on a request ID shows that invocation on its own:

- Its **status**, error type, duration, billed duration, memory used against the memory size, and init duration or **Warm start**, read from its `REPORT` line.
- Its **X-Ray trace** as a waterfall when the invocation was traced: each segment and subsegment (the Lambda service, the function, DynamoDB calls, HTTP calls to other services) with its time, its status and the error it raised, so you see which call took the time or failed.
- Its **log lines**, every line that mentions the request ID.

<figure>
<img src="/media/docs/lambda/lambda-trace.webp?v=1" alt="One failed invocation of payment-authorize: status Failed with PaymentProvider.Timeout, 543 ms, 197 of 512 MB, warm start, and its X-Ray trace, where a POST to api.cardnet.example took 445 ms and returned a 504 Gateway Timeout." loading="lazy" decoding="async">
<figcaption>An invocation's report and its X-Ray trace: the 504 from the card gateway is the slow, failing call. Sample data.</figcaption>
</figure>

The trace ID comes from the `REPORT` line (`XRAY TraceId`). When the function has no active tracing, the view says so and points to Configuration. When the `REPORT` line has no trace ID but the function logged one itself, ARNscope uses that ID and says X-Ray has it only if the request was sampled.

## Log streams

**Log streams** lists the 20 newest streams with the time of their latest invocation. Open one to read it invocation by invocation: pick a request ID from the menu, or filter the lines as you type. The **Invocation details** panel shows the selected invocation's request ID, status, start, duration, billed duration and memory, and the log group and stream it came from.

<figure class="doc-clip">
<video data-clip controls muted loop playsinline preload="none" poster="/media/docs/lambda/lambda-streams.webp?v=1" aria-label="The Log streams tab: opening the newest stream, then choosing another invocation from the request ID menu.">
<source src="/media/docs/lambda/lambda-streams.webm?v=1" type="video/webm">
<source src="/media/docs/lambda/lambda-streams.mp4?v=1" type="video/mp4">
</video>
<figcaption>A log stream, read invocation by invocation.</figcaption>
</figure>

## Live Tail

**Tail function** starts CloudWatch Logs Live Tail across every stream of the function, and new lines arrive as they are written, with a **Live** chip while it runs and a request ID menu to pick one invocation. **Stop tail** ends it, and it also stops when you leave the page. The view keeps the newest 2,000 records and drops older ones, and it says when CloudWatch sampled a busy update. Live Tail is billed by CloudWatch per minute.

<figure class="doc-clip">
<video data-clip controls muted loop playsinline preload="none" poster="/media/docs/lambda/lambda-live-tail.webp?v=1" aria-label="Tail function starts Live Tail; new invocations of payment-authorize arrive as they are written.">
<source src="/media/docs/lambda/lambda-live-tail.webm?v=1" type="video/webm">
<source src="/media/docs/lambda/lambda-live-tail.mp4?v=1" type="video/mp4">
</video>
<figcaption>Live Tail across every stream of the function.</figcaption>
</figure>

## Configuration

The **Configuration** tab shows what the Lambda console spreads over several pages, read-only:

- **General configuration:** state and last update status (with the reason when an update failed), last modified, revision, memory, timeout, ephemeral storage, handler, runtime version, description and reserved concurrency.
- **Code:** package type (zip or container image), code hash, the image URI for an image function, and the code signing config.
- **Permissions:** the execution role and the key that encrypts the environment.
- **Environment variables:** keys with their values masked. Reveal one or **Reveal all**, or copy a value. Values are never written to the activity log.
- **VPC** (subnets and security groups), **layers**, **file systems** (EFS), and **monitoring and operations** (log format and levels, the log group, X-Ray tracing, SnapStart) and **tags**.

<figure>
<img src="/media/docs/lambda/lambda-configuration.webp?v=1" alt="The Configuration tab of order-validate: general configuration with state Active, last update Successful, memory, timeout, handler and reserved concurrency, then the code, permissions and masked environment variables." loading="lazy" decoding="async">
<figcaption>State, settings, role and environment variables on one tab. Sample data.</figcaption>
</figure>

If the profile can't read one part (a read-only role often lacks `lambda:GetFunctionCodeSigningConfig` or `lambda:ListTags`), only that part says "Not readable with this profile" with the action it needs; the rest of the tab still shows.

## Connections

**Connections** shows what invokes the function and where its results go:

- **Triggers:** event source mappings (SQS, Kinesis, DynamoDB streams, MSK, self-managed Kafka and others) with their state, batch size, window, filters and last processing result, and push triggers (S3, SNS, EventBridge, API Gateway and other services) found in the resource-based policy. A queue, table, stream, cluster, state machine or log group opens on its own page in ARNscope.
- **Resource-based policy:** each statement with its principal, actions and conditions, and the full JSON.
- **Function URL:** the URL, its auth type (a public URL is marked) and CORS settings.
- **Asynchronous invocation:** retry attempts, maximum event age, on-success and on-failure destinations, and the dead-letter queue.

<figure>
<img src="/media/docs/lambda/lambda-connections.webp?v=1" alt="The Connections tab of order-validate: an SQS event source mapping from order-events, enabled with batch size 10 and a filter, an API Gateway push trigger, and the resource-based policy statements with their principals and conditions." loading="lazy" decoding="async">
<figcaption>Triggers from event source mappings and the resource policy, side by side. Sample data.</figcaption>
</figure>

For an alias or version, the triggers, policy, function URL and asynchronous config are the ones on that qualifier. A function URL attaches to `$LATEST` or an alias, never to a published version.

## Code

The **Code** tab downloads the function's deployment package and shows it read-only: a file tree, with the handler's file marked, and a viewer with syntax colours. The bar above shows the code hash, the package size zipped and unzipped, the number of files and the handler. **Save .zip** saves the package as AWS returned it, through a native Save dialog.

<figure>
<img src="/media/docs/lambda/lambda-code.webp?v=1" alt="The Code tab of payment-authorize: the package's file tree with dist/handler.js marked as the handler, and the file open in a read-only viewer." loading="lazy" decoding="async">
<figcaption>The deployment package, read-only, with the handler's file marked. Sample data.</figcaption>
</figure>

The package link AWS returns is used inside the app only, over HTTPS to AWS hosts, and is never shown, copied or logged. ARNscope opens packages up to 50 MB zipped and 250 MB unzipped (Lambda's own limits for a direct upload and an unzipped package) with up to 20,000 files, and shows files up to 2 MB; binary files are listed but not shown. For anything larger, the tab gives the AWS CLI command that prints a download link. A container image function shows its image URI and digest instead, since its code lives in ECR.

## Test and invoke

The **Test** tab (also the **Test** button in the header) holds test events and runs the function:

- **Saved events** are kept per function on this Mac. **New from template** starts from an empty event, an API Gateway proxy request, an SQS message, an S3 put or an EventBridge scheduled event. Rename, duplicate and delete them from the **…** menu.
- **Synchronous** waits for the function and shows the status code, the version that ran, the duration, billed duration, memory used and init duration from the log tail's `REPORT` line, the request ID, the response payload (up to 256 KB) and the last 4 KB of the log.
- **Asynchronous** queues the event (an `Event` invoke); Lambda answers 202 at once, and the output goes to the logs and any destinations.
- The event runs on what the picker shows: `$LATEST`, a version, or an alias (which may split traffic between two versions).

<figure>
<img src="/media/docs/lambda/lambda-test.webp?v=1" alt="The Test tab of order-validate: the saved event Valid cart on the left, and on the right a synchronous result that Succeeded with status 200, executed version $LATEST, 127 ms duration, 104 of 512 MB, warm start, the request ID and the response payload." loading="lazy" decoding="async">
<figcaption>A saved event, run synchronously: the response, the report and the request ID. Sample data.</figcaption>
</figure>

**Invoke** runs the function for real, so it is a **write**: it needs **Writes** switched on for the profile and the function's region, and after you click it a native confirmation shows the function (with its version or alias) and the start of the payload before anything is sent. The event can be up to 6 MB. If your role cannot invoke the function, the tab says so with the reason from the [IAM permission check](https://arnscope.com/docs/iam-permission-check).

## Change settings

With **Writes** on for the profile and region, ARNscope can change a function's settings. Every change opens a dialog that shows each field before and after, then a native confirmation before anything is sent. On a production profile the dialog is marked **Prod** and its button says so (for example **Apply to production…**). Each change is recorded in the [activity log](https://arnscope.com/docs/activity-log), with environment variable key names only, never values.

| Where | What you can change |
| --- | --- |
| Configuration → **Edit settings…** | Memory, timeout, ephemeral storage and description of `$LATEST` |
| Configuration → **Edit variables…** | Environment variables: add, change or remove keys |
| Configuration → reserved concurrency **Change…** | Reserve concurrency, go back to the unreserved pool, or throttle the function (0) |
| Connections → asynchronous invocation **Edit settings…** | Retry attempts and maximum event age, for `$LATEST`, a version or an alias |
| Configuration → **Edit tags…** | Add, change or remove tags |
| Versions → **Publish version…** | Publish `$LATEST` as a new version, with a description |
| Versions → **Create alias…**, **Edit…**, **Delete…** | Point an alias at a version, or split its traffic between two versions with a weight, for a canary |
| Versions → **Add provisioned concurrency…**, **Edit…**, **Remove…** | Keep execution environments ready for an alias or version |

<img src="/media/docs/lambda/lambda-edit-env.webp?v=1" alt="The Edit environment variables dialog for order-validate on a production profile, marked Prod: each key with its masked value, reveal and remove buttons, Add variable, the note that only the keys you change are sent, and Review changes." loading="lazy" decoding="async">

These changes are built not to overwrite someone else's:

- **Environment variables** send only the keys you added, changed or removed; the others stay as they are. The update is tied to the function's revision, so if anyone (or a deploy) changed the function since you opened the dialog, it is refused and nothing changes. If the current variables can't be read, the edit is refused too.
- **Publish version** is refused if `$LATEST`'s code or configuration changed since the dialog read it, so the version is exactly what you reviewed. Alias edits are refused if the alias changed since you loaded it.
- After a configuration change, ARNscope waits up to a minute for Lambda to finish applying it and says whether it succeeded; if Lambda is still applying another update, nothing is changed.
- **Deleting an alias** that splits traffic, has provisioned concurrency, or is on a production profile needs its name typed first. Anything that calls the alias starts failing.
- Tags apply to the whole function. If Terraform or CloudFormation manages them, its next apply can undo your change, and the dialog says so.

Changes apply to `$LATEST` (or to the alias or version you pick, where AWS allows it). A published version never changes; pick `$LATEST` to edit settings.

## Permissions

| What | Actions |
| --- | --- |
| List functions | `lambda:ListFunctions` |
| Metrics, the list's last-day figures and fleet triage | `cloudwatch:GetMetricData` |
| Cold starts | `logs:StartQuery`, `logs:GetQueryResults`, `logs:StopQuery` |
| Log search, error groups and an invocation's lines | `logs:FilterLogEvents` |
| X-Ray trace | `xray:BatchGetTraces` |
| Log streams | `logs:DescribeLogStreams`, `logs:GetLogEvents` |
| Live Tail | `logs:StartLiveTail`, `logs:DescribeLogGroups` |
| Configuration and Code | `lambda:GetFunction`; optional: `lambda:ListTags`, `lambda:GetFunctionCodeSigningConfig` |
| Connections | `lambda:ListEventSourceMappings`, `lambda:GetPolicy`, `lambda:GetFunctionUrlConfig`, `lambda:GetFunctionEventInvokeConfig` |
| Versions and aliases | `lambda:ListVersionsByFunction`, `lambda:ListAliases`, `lambda:ListProvisionedConcurrencyConfigs`; a version's log streams: `logs:DescribeLogStreams` |
| Invoke (write) | `lambda:InvokeFunction` |
| Memory, timeout, storage, description, environment (write) | `lambda:UpdateFunctionConfiguration`, `lambda:GetFunctionConfiguration` |
| Reserved concurrency (write) | `lambda:PutFunctionConcurrency`, `lambda:DeleteFunctionConcurrency` |
| Asynchronous invocation (write) | `lambda:UpdateFunctionEventInvokeConfig`, `lambda:PutFunctionEventInvokeConfig` |
| Tags (write) | `lambda:TagResource`, `lambda:UntagResource` |
| Publish version (write) | `lambda:PublishVersion` |
| Aliases (write) | `lambda:CreateAlias`, `lambda:UpdateAlias`, `lambda:DeleteAlias` |
| Provisioned concurrency (write) | `lambda:PutProvisionedConcurrencyConfig`, `lambda:DeleteProvisionedConcurrencyConfig` |

The Configuration, Connections and Versions reads are each optional: a denied one shows in its own section only. Downloading the code package needs no further action than `lambda:GetFunction`, which returns its download link. A read-only role needs none of the write actions.

## Limitations

- **No code deploys.** ARNscope does not upload code, change the runtime, handler, role, VPC, layers or image, or create and delete functions. Use your deploy pipeline for those.
- **Code is read-only**, and only for packages up to 50 MB zipped, 250 MB unzipped and 20,000 files; files over 2 MB and binary files are not shown. Container image functions show their image, not their files.
- **Per-version metrics depend on what AWS publishes.** A version reached through an alias counts only through the `ExecutedVersion` dimension, which has no throttles or concurrency; `$LATEST` on its own has no separate series.
- **X-Ray only when tracing is on.** A trace appears for an invocation that was traced and sampled; with tracing off, the invocation view shows the report and log lines only.
- Error groups read error-looking lines with `FilterLogEvents`; a long range can take several **Load older** pages, and an invocation's lines are searched within 16 minutes on either side of it, up to 1,000 lines. Traces show up to 500 spans.
- Search shows 500 events per page; Log streams lists the 20 newest streams.
- Cold starts need the function's `REPORT` lines in its log group, and each count runs a billed Logs Insights query.
- Live Tail can be sampled by CloudWatch for busy log groups; ARNscope says when it happens.
- Invoking and every settings change need Writes on for the profile and the function's region.
- Fleet triage limits are listed on [its own page](https://arnscope.com/docs/lambda-fleet-triage#limitations).

Missing something you use in the Lambda console? Write to [hello@arnscope.com](mailto:hello@arnscope.com) and tell us what it is.

Source: https://arnscope.com/docs/lambda
