---
title: Monitor response streaming Lambda functions
source: https://docs.newrelic.com/docs/serverless-function-monitoring/aws-lambda-monitoring/response-stream
---

You can monitor AWS Lambda functions that use [response streaming](https://aws.amazon.com/blogs/compute/introducing-aws-lambda-response-streaming/) in Node.js applications to get real-time insights into the performance and behavior of each invocation. This solution integrates with [AI monitoring](https://docs.newrelic.com/docs/ai-monitoring/intro-to-ai-monitoring/) to allow you to track model responses and collect observability data related to your AI workloads. Using these capabilities, you can optimize your serverless applications' performance and maintain comprehensive oversight of AI-driven processes.

This document helps you to:

-   Set up monitoring response streaming Lambda functions
-   Understand the metrics and data available for response streaming Lambda functions
-   Learn how to use the New Relic UI to monitor and observe the performance of your response streaming Lambda functions

![Lambda response monitoring in the New Relic platform](https://docs.newrelic.com/images/ss-ai-response-page.gif "New Relic AI Responses page")

## Set up the Lambda response streaming [#setup]

### Prerequisites [#prerequisites]

-   Check that your Lambda function meets our [compatibility and requirements](https://docs.newrelic.com/docs/serverless-function-monitoring/aws-lambda-monitoring/instrument-lambda-function/compatibility-requirement-lambda-monitoring).
-   Use the [latest lambda layer](https://layers.newrelic-external.com) available for Node.js.

### Configure the Lambda response streaming [#configure-response-streaming]

To enable response streaming monitoring for your Node.js Lambda functions:

1.  Install and configure [Lambda monitoring on New Relic](https://docs.newrelic.com/docs/serverless-function-monitoring/aws-lambda-monitoring/instrument-lambda-function/configure-serverless-aws-monitoring).

2.  Add the required [environment variables](https://docs.newrelic.com/docs/serverless-function-monitoring/aws-lambda-monitoring/instrument-lambda-function/env-variables-lambda) for Node.js response streaming Lambda functions.

3.  Save the changes and deploy the function.

    After deployment, you can view the Lambda response streaming data in the New Relic platform. For more information, refer to [Access the Lambda response streaming data](#access-ui).

## Access the Lambda response streaming data [#access-ui]

To view the Lambda response streaming data in the New Relic platform:

1.  Go to **[one.newrelic.com](https://one.newrelic.com) > left navigation pane > All Capabilities > Serverless Functions**.
2.  Select the required Lambda function that uses response streaming.
3.  View Summary, Invocations, CloudWatch metrics, and distributed tracing for your response streaming Lambda functions.
4.  In the **More views** section, click **AI Responses**.

    To know more about AI responses, refer to [View AI responses](https://docs.newrelic.com/docs/ai-monitoring/explore-ai-data/view-ai-responses).

## Key metrics for response streaming [#key-metrics]

On the **Cloudwatch metrics** page, monitor the following metrics related to response streaming:

-   **Streamed Outbound Bytes:** Displays the average number of bytes streamed out by the Lambda function.
-   **Streamed Outbound Throughput:** Displays the average rate at which bytes are streamed out by the Lambda function.

![Lambda response monitoring in the New Relic platform](https://docs.newrelic.com/images/ss-ai-response.webp "New Relic AI Responses page")

For more about our UI, see [Intro to the New Relic platform](https://docs.newrelic.com/docs/new-relic-solutions/new-relic-one/introduction-new-relic-platform).
