• /
  • EnglishEspañolFrançais日本語한국어Português
  • Log inStart now

Layered instrumentation

You can instrument your Lambda functions by adding the New Relic Lambda layer. This integrates the New Relic agent, enabling automatic monitoring whenever your functions are invoked.

a diagram depicting non-containerized lambda function instrumentation

Tip

New Relic recommends integrating your AWS account with New Relic using the AWS integration to automatically discover and monitor your Lambda functions. This allows you to leverage the full power of New Relic APM for your serverless functions.

Instrumentation methods

New Relic offers several methods to instrument your AWS Lambda functions for comprehensive monitoring:

  • Command Line Interface (CLI): Use the AWS CLI to quickly add the New Relic layer to your Lambda functions.
  • Serverless Framework: Seamlessly integrate New Relic instrumentation into your serverless deployments.
  • CloudFormation/SAM: Include the New Relic layer in your infrastructure-as-code templates.
  • AWS CDK: Add New Relic Lambda layer in your CDK code alongside other infrastructure resources.
  • Terraform: Easily manage New Relic instrumentation alongside your other infrastructure resources.
  • Manual Instrumentation: Directly add the New Relic layer through the AWS Lambda console for more granular control.

Regardless of the method you choose, the New Relic layer adds the New Relic agent to your functions. This agent automatically instruments your functions upon invocation, generating a payload, NR_LAMBDA_MONITORING, that is sent to New Relic via the New Relic Lambda extension.

Depending on your needs, you can choose to either bypass the extension and only see telemetry in CloudWatch, bypass CloudWatch, or use CloudWatch as a fallback. The CloudWatch section at end of this doc will guide you through each option.

Find and use data

After you instrument your AWS Lambda functions, you can find and use the data in the New Relic APM interface. The data is organized into several key areas, each providing different insights into the performance and health of your Lambda functions.

In the APM interface, you can explore various aspects of your Lambda functions including distributed tracing, service maps, transactions, and error analysis, and many more. Each of these areas provides detailed insights into the performance, latency, and error rates of your Lambda functions, allowing you to quickly identify and resolve issues.

Tip

The Invocation experience is now integrated with APM transaction traces. This allows you to use a specific AWS RequestId to drill-down into an APM transaction trace for detailed information about that particular Lambda execution.

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

  1. Go to 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.

Compatibility and requirement

Learn more about supported runtimes and prerequisites

Troubleshooting

Learn how to troubleshoot installation related issues

Copyright © 2025 New Relic Inc.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.