---
title: Upgrade to APM experience
source: https://docs.newrelic.com/docs/serverless-function-monitoring/aws-lambda-monitoring/instrument-lambda-function/upgrade-to-apm-experience
---

You can upgrade your existing Lambda functions to the new unified monitoring experience with minimal effort. This transition allows you to monitor your Lambda functions with enhanced observability capabilities of New Relic. You can instrument all your existing Lambda functions in bulk, or you can choose to upgrade them one at a time. The upgrade process is non-intrusive and does not require any code changes to your existing functions.

This upgrade applies to Lambda functions instrumented with either New Relic Lambda layers or OpenTelemetry (ADOT) layers. Both layer types deliver the same APM UI experience.

> #### 💡 TIP
>
> **Lambda Managed Instance (LMI) users**: No upgrade steps are required. LMI functions are automatically detected and configured to run in APM mode — even without setting `NEW_RELIC_APM_LAMBDA_MODE = true`. Note that Serverless mode is not supported for LMI; only APM mode is available. See [Layered instrumentation](https://docs.newrelic.com/docs/serverless-function-monitoring/aws-lambda-monitoring/instrument-lambda-function/instrument-your-own) for LMI setup details.

**Prerequisites**

-   Your Lambda functions is already instrumented in New Relic.
-   Your Lambda functions are running on either `python`, `nodejs`, `ruby`, `go`, or `.NET` runtime. To view the list of supported versions of these runtimes, refer to [compatibility and requirements docs](https://docs.newrelic.com/docs/serverless-function-monitoring/aws-lambda-monitoring/instrument-lambda-function/compatibility-requirement-lambda-monitoring/).

## Instrumentation methods

You can upgrade your existing Lambda functions using one of the following methods:

-   [New Relic UI](#ui)
-   [Update using CLIs](#cli)

> #### 💡 TIP
>
> New Relic recommends integrating your AWS account with New Relic using the [AWS integration](https://docs.newrelic.com/docs/infrastructure/amazon-integrations/get-started/introduction-aws-integrations/) to automatically discover and monitor your Lambda functions. This allows you to leverage the full power of New Relic APM for your serverless functions.

### Update using New Relic UI [#ui]

You can upgrade your existing Lambda functions using the New Relic UI.

**To upgrade your existing Lambda functions from New Relic platform, follow these steps:**

1.  Go to **[one.newrelic.com > All capabilities > Serverless Functions](https://one.newrelic.com/nr1-core?state=23b04845-da13-2b11-5826-9c20326276d9)** > select your Lambda function entity.
2.  On the Summary page, click **Instrument for APM**.
3.  On the Lambda Function for APM page, provide the API key then click **Continue**.
4.  By default, current Lambda entity is selected for upgrade. You can also select other Lambda functions to upgrade. Click **Generate New Relic CLI command**.
5.  Copy the command and run it in your terminal or in your AWS terminal. The command will install the New Relic Lambda layer on your selected functions.
6.  Click **Continue** to test the installation. The test will check whether the New Relic Lambda layer is installed correctly and whether the function is sending data to New Relic.
7.  If the test is successful, you will see a success message. To view your Lambda function in the New Relic APM interface, click **See your data in APM**.

### Update using CLIs [#cli]

**New Relic CLI**

> #### ⚠️ IMPORTANT
>
> Ensure that your New Relic CLI version is `0.9.8` or later. You can check your CLI version by running `newrelic-lambda --version`. If you need to update your CLI, update the CLI. For example, if you installed the CLI using `pip3`, you can update it with the following command:
>
> ```bash
>     pip3 install --upgrade newrelic-lambda
> ```

1.  To upgrade your Lambda function, use the `newrelic-lambda` CLI quickstart as shown here.

    ```bash
    newrelic-lambda layers install --nr-account-id YOUR_NEW_RELIC_ACCOUNT_ID --function my-function --upgrade --apm
    ```

    > #### 💡 TIP
    >
    > This command automatically finds the newest available layer for your Lambda's region and runtime.

2.  To migrate alerts from your existing Lambda functions to APM, run the following command:
    ```bash
    newrelic-lambda apm alerts-migrate \
        --nr-account-id <YOUR_NEW_RELIC_ACCOUNT_ID> \
        --nr-api-key <YOUR_NEW_RELIC_API_KEY>
        --function <YOUR_LAMBDA_FUNCTION_NAME>
    ```

**For AWS CDK, AWS SAM, or Terraform**

1.  Update to [latest New Relic Lambda layer](https://layers.newrelic-external.com/) for your project using [AWS CDK](https://docs.newrelic.com/docs/serverless-function-monitoring/aws-lambda-monitoring/instrument-lambda-function/instrument-your-own/#cdk), [AWS SAM](https://docs.newrelic.com/docs/serverless-function-monitoring/aws-lambda-monitoring/instrument-lambda-function/instrument-your-own/#cloudformation), or [Terraform](https://docs.newrelic.com/docs/serverless-function-monitoring/aws-lambda-monitoring/instrument-lambda-function/instrument-your-own/#terraform).
2.  Set the `NEW_RELIC_APM_LAMBDA_MODE` [environment variable](https://docs.newrelic.com/docs/serverless-function-monitoring/aws-lambda-monitoring/instrument-lambda-function/env-variables-lambda/) to `true` in your Lambda function configuration. This enables the APM mode for the New Relic Lambda layer.
3.  Deploy your Lambda function with the updated configuration.
4.  In the Configuration tab of your AWS Management Console, add the `NR.Apm.Lambda.Mode: true` tag to your Lambda function.
5.  If you are not using an [AWS cloud integration](https://docs.newrelic.com/docs/infrastructure/amazon-integrations/get-started/introduction-aws-integrations/) (Metric Stream or API Polling) to synchronize CloudWatch tags, set the `NR_TAGS` environment variable to `NR.Apm.Lambda.Mode:true`. This allows the New Relic Lambda Extension to send the required metadata directly to New Relic.

## Update existing Lambda alerts and dashboards  [#alerts-dashboards]

After you upgrade your existing Lambda functions to `APM + Serverless Convergence`, it's crucial to update the NRQL queries in your alert conditions and dashboard widgets. This new upgrade changes the metric paths for your Lambda data. Modifying your queries is necessary to ensure your alerts and dashboards use these new paths and continue to provide accurate monitoring and notifications. This is required for any existing Lambda functions that you have transitioned to `APM + Serverless Convergence`.

-   For alerts, review your existing Lambda alert conditions. Update any NRQL queries that use metrics sourced from layers with the new metrics. For more information on how to update your alert conditions, refer to the [Update an alert](https://docs.newrelic.com/docs/alerts/create-alert/create-alert-condition/alert-conditions/#edit-existing-alert-condition).

-   For dashboards, review your existing Lambda dashboard widgets. Update any NRQL queries that use metrics sourced from layers with the new metrics. For more information on how to update your dashboard widgets, refer to the [manage dashboard](https://docs.newrelic.com/docs/query-your-data/explore-query-data/dashboards/manage-your-dashboard/).

## Find and use data [#find-data]

After you instrument your AWS Lambda functions, you can find and use the data in the New Relic APM interface. Lambda functions instrumented via OpenTelemetry (ADOT layer) now display the same APM UI experience as functions instrumented with New Relic APM agents, including a consistent **Summary** page and normalized metrics in `apm.*` format.

To view your Lambda functions in the New Relic APM interface:

1.  Go to **[one.newrelic.com](https://one.newrelic.com) > APM & Services**.
2.  Set the search criteria as `isLambdaFunction = true`.
3.  From the displayed list, select your Lambda function to view the data.

> #### ⚠️ IMPORTANT
>
> The New Relic APM UI does not display historical data for Lambda functions that were instrumented before the `APM + Serverless Convergence` upgrade. To view the historical data, click **see serverless functions** on the **APM Summary** page.

### Summary [#summary]

The **Summary** page provides a quick view of the most important performance data for your Lambda function, including response time, throughput, and error rate. This page is available for both APM-instrumented and OpenTelemetry (ADOT)-instrumented Lambda functions.

### CloudWatch metrics [#cloudwatch-metrics]

The **CloudWatch metrics** tab displays Lambda performance data sourced from AWS CloudWatch via New Relic's metric synthesis layer. Charts include:

-   Invocation counts
-   Duration
-   Throttles
-   Error counts

This tab is available for both APM-instrumented and OpenTelemetry (ADOT)-instrumented Lambda functions.

### Lambda metrics [#lambda-metrics]

The **Lambda metrics** tab displays performance data sourced directly from the New Relic Lambda layer. It is organized into two sections:

-   **Costs**: Invocations and Memory usage charts.
-   **Performance**: Cold starts, time outs, iterator age, and concurrent executions.

> #### 💡 NOTE
>
> For Lambda functions running in **Lambda Managed Instance (LMI)** mode, the **Billed duration** chart is not shown in the Costs section. LMI billing is based on EC2 cost, management fee, and vCPU usage — not Lambda execution duration.

### Transactions [#transactions]

The **Transactions** tab lists Lambda transactions with performance data such as duration and throughput. The **AWS Request ID** column identifies each Lambda execution by its unique AWS request identifier, allowing you to drill down into a specific invocation's APM transaction trace for detailed information about that particular Lambda execution.

### Distributed tracing [#distributed-tracing]

The **Distributed tracing** tab shows distributed traces that include the monitored Lambda function. For details, see [Distributed tracing](https://docs.newrelic.com/docs/distributed-tracing/concepts/introduction-distributed-tracing/).

### Errors [#errors]

The **Errors** tab displays errors and exceptions for your Lambda function. You can filter by error rate, error percentage, or error class, and drill down into stack traces.

### Logs [#logs]

The **Logs** tab displays recent log messages from your Lambda function. For details, see [Logs](https://docs.newrelic.com/docs/logs/new-relic-logs/get-started/introduction-new-relic-logs).

### Rollback [#rollback]

If you need to revert your Lambda functions back to the previous serverless monitoring experience, you can do so by setting the `NEW_RELIC_APM_LAMBDA_MODE` environment variable to `false`.

## Related articles [#related-docs]

[Compatibility and requirement](https://docs.newrelic.com/docs/serverless-function-monitoring/aws-lambda-monitoring/instrument-lambda-function/compatibility-requirement-lambda-monitoring)

Learn more about supported runtimes and prerequisites

[Troubleshooting](https://docs.newrelic.com/docs/serverless-function-monitoring/aws-lambda-monitoring/troubleshooting/troubleshoot-enabling-serverless-monitoring-aws-lambda)

Learn how to troubleshoot installation related issues
