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 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. You can view your Lambda data in pre-built dashboards and also create custom queries and charts in New Relic One.
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 > 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 |
---|---|
| 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. |
| 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:
|
| 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. |
| The AWS region where the function is executed. Only for functions that are run by Lambda@Edge service. |
| 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:
|
| 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. |
| 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. |
| 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 |
---|---|
| 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. |
| 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
EOL NOTICE
After March 2022, we're discontinuing support for several capabilities, including inventory data for cloud integrations. For more details, including how you can easily prepare for this transition, see our Explorers Hub post.
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.
Name | Description |
---|---|
| SHA256 hash of the function deployment package. |
| The size, in bytes, of the function .zip file that was uploaded. |
| The ARN of an Amazon SQS queue or Amazon SNS topic that has been specified as the Dead Letter Queue. |
| The function description provided by the user. |
| The ARN assigned to the function. |
| The name of the function. |
| The function Lambda calls to begin executing the function. |
| The KMS key used to encrypt the function's environment variables. Only returned if you've configured a customer managed CMK. |
| The time stamp of the last time the function was updated. |
| The list of ARN of the function layers. |
| For Lambda@Edge functions, the ARN of the master function. |
| The memory size, in MB, that was configured for the function. |
| Represents the latest updated revision of the function or alias. |
| The ARN of the IAM role that Lambda assumes when it executes the function to access any other AWS resources. |
| The runtime environment for the Lambda function. |
| The function execution time at which Lambda should terminate the function. |
| The tracing mode associated with the Lambda function. |
| The version of the Lambda function. |
| The VPC ID associated with the Lambda function. |
| A list of security group IDs associated with the Lambda function. |
| A list of subnet IDs associated with the Lambda function. |
aws/lambda/alias/
This entity describes Alias inventory data.
Name | Description |
---|---|
| Lambda function ARN that is qualified using the alias name as the suffix. |
| Alias name. |
| Alias description. |
| Function name to which the alias points. |
| Function version to which the alias points. |
| A unique identifier that changes when you update the alias. |
| The routing configuration of the alias. |
aws/lambda/region/
This entity describes Lambda region inventory data.
Name | Description |
---|---|
| Number of simultaneous executions of a function per region. |
aws/lambda/event-source-mapping/
This entity describes the mapping between an event source (such as a Kinesis stream, an SQS queue, or a DynamoDB stream) and an AWS Lambda function. For full documentation on the possible values, see Amazon's documentation for EventSourceMappingConfiguration.
Name | Description |
---|---|
| The largest number of records that AWS Lambda will retrieve from an event source at the time of invoking the function. |
| The ARN of the Amazon Kinesis stream that is the source of events. |
| The Lambda function to invoke when AWS Lambda detects an event on the stream. |
| The UTC time string indicating the last time the event mapping was updated. |
| The state of the event source mapping. |
| The cause of the last state change, either |
| The AWS Lambda assigned opaque identifier for the mapping. |