AWS Lambda monitoring integration

Access to this feature depends on your subscription level. Requires Infrastructure Pro.

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

Features

AWS Lambda is a zero-administration compute platform for back-end 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 and inventory data. You can view your Lambda data in pre-built dashboards and also create custom queries and charts in New Relic Insights.

Activate integration

To enable this integration, follow the instructions in Connect AWS services to Infrastructure.

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 in Infrastructure, go to infrastructure.newrelic.com > Integrations > Amazon Web Services and select one of the Lambda integration links.

In New Relic Insights, data is attached to the ServerlessSample event type, with provider values of LambdaRegion​, LambdaFunction, LambdaFunctionAlias, and LambdaEventSourceMapping.

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.

Name Description
invocations
count
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.
errors
count

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).

duration
timer
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.
throttles
count
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 provider value of LambdaRegion.

Name Description
concurrentExecutions

Emitted as an aggregate metric for all functions in the account, and for functions that have a custom concurrency limit specified. 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.

Inventory data

This integration supports the following inventory data. For more about inventory data, see Understand integration data.

aws/lambda/function/

This entity describes Lambda function inventory data. For full documentation on the possible values, see Amazon's documentation for FunctionConfiguration.

Attribute Description
codeSha256 SHA256 hash of the function deployment package.
codeSize

The size, in bytes, of the function .zip file that was uploaded.

deadLetterArn The ARN of an Amazon SQS queue or Amazon SNS topic that has been specified as the Dead Letter Queue.
description The function description provided by the user.
functionArn The ARN assigned to the function.
functionName The name of the function.
handler

The function Lambda calls to begin executing the function.

lastModified The time stamp of the last time the function was updated.
memorySize The memory size, in MB, that was configured for the function.
role

The ARN of the IAM role that Lambda assumes when it executes the function to access any other AWS resources.

runtime

The runtime environment for the Lambda function.

timeout The function execution time at which Lambda should terminate the function.
tracingMode

The tracing mode associated with the Lambda function.

version The version of the Lambda function.
vpcId

The VPC ID associated with the Lambda function.

vpcSecurityGroupsIds A list of security group IDs associated with the Lambda function.
vpcSubnetIds A list of subnet IDs associated with the Lambda function.

aws/lambda/alias/

This entity describes Alias inventory data.

Attribute Description

aliasArn

Lambda function ARN that is qualified using the alias name as the suffix.
aliasName Alias name.
description Alias description.
functionName Function name to which the alias points.
functionVersion Function version to which the alias points.

aws/lambda/region/

This entity describes Lambda region inventory data.

Attribute Description

concurrentExecutions

Number of simultaneous executions of a function per region.

aws/lambda/event-source-mapping/

This entity describes the mapping between an Amazon Kinesis stream and a Lambda function. For full documentation on the possible values, Amazon's documentation for EventSourceMappingConfiguration.

Attribute Description

batchSize

The largest number of records that AWS Lambda will retrieve from an event source at the time of invoking the function.
eventSourceArn

The ARN of the Amazon Kinesis stream that is the source of events.

functionArn

The Lambda function to invoke when AWS Lambda detects an event on the stream.

lastModified

The UTC time string indicating the last time the event mapping was updated.

state The state of the event source mapping.
uuid The AWS Lambda assigned opaque identifier for the mapping.

For more help

Recommendations for learning more: