• EnglishEspañol日本語한국어Português
  • Log inStart now

AWS Lambda monitoring integration

Important

Enable the AWS CloudWatch Metric Streams integration to monitor all CloudWatch metrics from your AWS services, including custom namespaces. Individual integrations are no longer our recommended option.

New Relic infrastructure integrations include an integration for reporting your AWS Lambda data to New Relic. This document explains how to activate this integration and describes the data that can be reported.

We also offers a more in-depth Lambda monitoring feature. For more information, see New Relic Serverless monitoring for AWS Lambda.

Features

AWS Lambda is a zero-administration compute platform for backend web developers. It runs your code for you in the AWS cloud and provides you with a fine-grained pricing structure.

Lambda functions are pieces of custom code that run when a certain event happens. In order to identify the events that invoke a particular Lambda function, AWS Lambda users define event source mappings. Optionally, aliases can be used to point to a specific version of a Lambda function.

New Relic's AWS Lambda integration reports data such as invocation counts, error counts, function timers, and other metrics. You can view your Lambda data in pre-built dashboards and also create custom queries and charts.

Activate integration

To enable this integration follow standard procedures to Connect AWS services to New Relic.

Important

If you use custom keys to encrypt environment variables, you might start seeing KMS decryption errors in Cloudtrail console. This is because the API that is used to fetch lambdas always tries to retrieve environment variables information as part of its response. New Relic doesn't receive or store this information.

Configuration and polling

You can change the polling frequency and filter data using configuration options.

Default polling information for the AWS Lambda integration:

  • New Relic polling interval: 5 minutes
  • Amazon CloudWatch data interval: 1 minute

Find and use data

To find your integration data, go to one.newrelic.com > All capabilities > Infrastructure > AWS and select one of the Lambda integration links.

You can query and explore your data using the ServerlessSample event type, with provider values of LambdaRegion , LambdaFunction and LambdaFunctionAlias.

For more on how to use your data, see Understand and use integration data.

Metric data

This integration collects the following metrics. For more on these metrics, see Amazon's Lambda documentation.

Function and Alias

Lambda function and Alias data is attached to the ServerlessSample event type, with a provider value of LambdaFunction and LambdaFunctionAlias, respectively.

Additionally, if you're using AWS CloudFront to execute the functions in AWS locations closer to the clients, and have enabled the filter to collect Lambda@Edge metrics, these data will be attached to the ServerlessSample event type, with a provider value of LambdaEdgeFunction.

Name

Description

concurrentExecutions

Only available for functions that have a custom concurrency limit specified. Not applicable for versions or aliases. Measures the sum of concurrent executions for a given function at a given point in time. Must be viewed as an average metric if aggregated across a time period.

deadLetterErrors

Measures the number of times that a function is unable to write the failed event payload to your configured Dead Letter Queues. This could be due to one of the following:

  • Permissions errors
  • Throttles from downstream services
  • Misconfigured resources
  • Timeouts

duration

Measures the elapsed wall clock time in milliseconds from when the function code starts executing as a result of an invocation to when it stops executing. (This metric replaces the deprecated Latency metric.) The maximum data point value possible is the function timeout configuration. The billed duration will be rounded up to the nearest 100 milliseconds. Note that AWS Lambda only sends these metrics to CloudWatch if they have a nonzero value.

edge-region

The AWS region where the function is executed. Only for functions that are run by Lambda@Edge service.

errors

Measures the number of invocations that failed due to errors in the function (response code 4XX). This replaces the deprecated ErrorCount metric. Failed invocations may trigger a retry attempt that succeeds. This includes:

  • Handled exceptions (for example, context.fail(error))

  • Unhandled exceptions causing the code to exit

  • Out of memory exceptions

  • Timeouts

  • Permissions errors

    This does not include invocations that fail due to invocation rates exceeding default concurrent limits (error code 429) or failures due to internal service errors (error code 500).

invocations

Measures the number of times a function is invoked in response to an event or invocation API call. This replaces the deprecated RequestCount metric. This includes successful and failed invocations, but does not include throttled attempts. This equals the billed requests for the function. Note that AWS Lambda only sends these metrics to CloudWatch if they have a nonzero value.

iteratorAge

Only available for stream-based invocations (functions triggered by an Amazon DynamoDB stream or Kinesis stream). Measures the age of the last record in milliseconds for each batch of records processed. Age is the difference between the time Lambda received the batch, and the time the last record in the batch was written to the stream.

streamedOutboundBytes (Response streaming mode only)

The number of bytes streamed out of Lambda function (the response steaming mode has to design the function).

streamedOutboundThroughput (Response streaming mode only)

The throughput of Lambda function in bytes per second.

throttles

Measures the number of Lambda function invocation attempts that were throttled due to invocation rates exceeding the customer's concurrent limits (error code 429). Failed invocations may trigger a retry attempt that succeeds.

Region

Lambda region data is attached to the ServerlessSample event type, with a provider value of LambdaRegion.

Name

Description

concurrentExecutions

Emitted as an aggregate metric for all functions in the account. Measures the sum of concurrent executions for a given function at a given point in time. Must be viewed as an average metric if aggregated across a time period.

unreservedConcurrentExecutions

Emitted as an aggregate metric for all functions in the account only. Represents the sum of the concurrency of the functions that do not have a custom concurrency limit specified. Must be viewed as an average metric if aggregated across a time period.

Copyright © 2024 New Relic Inc.

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