• /
  • Log in

Troubleshoot enabling serverless monitoring of AWS Lambda

Problem

You’re attempting to enable serverless monitoring for AWS Lambda and are having an issue or error.

Solution

There are two common problems related to not completing all of the enablement procedures:

  • Not seeing data on CloudWatch metrics UI page. This means the AWS integration step wasn't completed.
  • Not seeing data on Troubleshooting category UI pages. If you aren't seeing data on the Distributed tracing, Errors, and Invocations UI tabs, this means the APM agent instrumentation step wasn't completed.

Besides these basic enablement problems, there are some additional problems that may cause an issue:

  • CloudWatch error "HTTP error 401: unauthorized." This is due to an incorrect API Key. The --nr-api-keyargument in the Configure AWS enable step takes your user key, which is different from the REST API key.

  • Custom metrics are missing. Lambda monitoring is not compatible with our custom metrics. Use custom attributes to add metadata.

  • Invocations missing. To see invocation breakdown details, distributed tracing must be enabled as part of the Lambda instrumentation step. Distributed tracing is required so that span details can be displayed in the invocation details pane.

  • You've completed the installation, integration, and instrumentation steps correctly, and your function is sending logs to CloudWatch but you're not seeing traces for specific dependencies (or any traces) in the UI. This may result from the order of layer merging (if you're using our Lambda layers) or from the order of import (if you're instrumenting manually):

    • If you're instrumenting with layers: make sure in your function configuration that the New Relic layer is merged before other layers (though if your function uses webpack, the New Relic layer should be merged after the webpack layer).
    • If you're instrumenting a Node function manually, make sure that your function imports newrelic and @newrelic/aws-sdk before it imports any dependencies you expect to monitor.

If none of these solutions help you, contact our support team. The following information will help you when you talk to support technicians:

  • Has the Lambda function appeared in the UI before? If so, what is the name of the function?
  • If some data for the Lambda function is appearing in the UI, what specific data is appearing?
  • What APM language agent are you using to instrument the function?

For more help

If you need more help, check out these support and learning resources:

Create issueEdit page
Copyright © 2021 New Relic Inc.