Docs » Integrations Guide » Monitor AWS Lambda

Monitor AWS Lambda

SignalFx enables you to monitor the health and performance of your AWS Lambda functions via metrics on total invocations, errors, durations and more. In addition, you can easily send custom application or business metrics from within your Lambda functions.

  • If you have enabled the SignalFx Amazon Web Services integration and are syncing CloudWatch metrics, those metrics will automatically be available to view in SignalFx charts and dashboards. We also import AWS Lambda metadata.

    Important

    Make sure you have added the AWS Lambda-specific statements to your Policy Document.

  • You can use one of our language-specific wrappers to monitor your functions. Using a wrapper lets you see invocations, errors and durations for your functions in real time, and also provides insight into whether a given function is being impacted by cold starts.

  • The wrapper is also a way for you to send in custom application or business metrics from within an AWS Lambda function, analogous to what you can do with our client libraries for code running in non-Lambda environments.

As with any other metric, custom metrics from AWS Lambda functions can be used in charts or detectors. To monitor the health and performance of your Lambda functions, you can use our built-in Lambda dashboards (discussed below) or the Infrastructure Navigator.

Using the built-in dashboards for AWS Lambda

SignalFx provides both an overview (summary) dashboard that shows metrics for all functions running in a Lambda and a dashboard that shows metrics for an individual function. One set of dashboards reflects metrics that are sent in automatically if you are syncing with Amazon Web Services CloudWatch, and another set reflects metrics sent in via one of our wrappers. That is, if you are using both CloudWatch and one of our wrappers, you will see four built‑in dashboards, as shown in the illustrations below.

AWS Lambda Function

Use the Lambda (AWS) Function dashboard to view invocation, error, throttle, and duration metrics, sent from CloudWatch, for a function you specify in the Overrides bar.

AWS Lambda Function dashboard

AWS Lambda Overview

Use the Lambda (AWS) Overview dashboard to view a summary of invocation, error, throttle, and duration metrics, sent from CloudWatch, for multiple functions. By default, data for all functions is represented. To narrow down the view to specific functions, use the Filter option.

AWS Lambda Overview dashboard

SignalFx Lambda Function

Use the Lambda (SignalFx) Function dashboard to view invocation, error, duration, and cold start metrics, sent from a function in one of our wrappers, for a function you specify in the Overrides bar.

SignalFx Lambda Function dashboard

SignalFx Lambda Overview

Use the Lambda (SignalFx) Overview dashboard to view a summary of invocation, error, duration, and cold start metrics, sent from functions in our wrappers, for multiple functions. By default, data for all functions is represented. To narrow down the view to specific functions, use the Filter option.

SignalFx Lambda Overview dashboard

Using the Infrastructure Navigator for AWS Lambda

To open the Infrastructure Navigator for AWS Lambda, hover over Infrastructure on the navigation bar and select Lambda Functions. The Infrastructure Navigator for AWS Lambda displays a list of all the functions that are currently running in Lambda. The top portion of the screen displays stats on each function. The bottom portion displays a set of information tabs containing data for the function, and may also contain additional dashboards on the right side. By default, aggregate data for all AWS Lambda functions is represented when you open the Infrastructure Navigator.

In the following illustration, the default dashboard displayed in the System Metrics tab is the AWS Lambda Overview dashboard. The corresponding dashboard for metrics sent using our wrappers, SignalFx Lambda Overview, is also available. You can also see currently active alerts for running functions in the Alerts tab.

AWS Lambda Overview dashboard
  • To increase the size of the bottom portion of the screen while still seeing aggregate data for all functions, click All Lambda Functions at the top of the list of functions.

    All AWS Lambda functions
  • To see metrics for a specific function, click the function name. In the following illustration, the default dashboard displayed in the System Metrics tab is the AWS Lambda Function dashboard. The corresponding dashboard for metrics sent using our wrappers, SignalFx Lambda Function, is also available (because both CloudWatch and a wrapper apply to this function). You can use the other information tabs to view active alerts, properties, and a list of available metrics for the function.

    Single AWS Lambda function
  • If there are multiple versions of a function running, you will see a caret next to the function name, indicating that the function can be expanded. In our examples, the LabTestApp function has multiple versions running.

    • Clicking the function name without expanding it displays aggregate data for all running versions of the function.

    • Expanding the function name and clicking on a version displays data for that version of the function (shown below).

      AWS Lambda function version
  • To return to the default display of all functions, deselect the selected item in the functions list.

Using wrappers to monitor AWS Lambda functions and apps

In addition to (or instead of) using CloudWatch data to monitor AWS Lambda, you can also use one of our wrappers. Each wrapper sends standard monitoring metrics in real time, but a wrapper also lets you send custom metrics to monitor the apps running inside your Lambda functions. We provide wrappers for NodeJS, Java, Python, and C#.

The Lambda wrappers send the following metrics to SignalFx:

Metric Name Type Description
function.invocations Counter Count of Lambda invocations
function.cold_starts Counter Count of cold starts
function.errors Counter Count of errors from underlying Lambda handler
function.duration Gauge Milliseconds in execution time of underlying Lambda handler

The Lambda wrappers add several dimensions to datapoints sent to SignalFx. These dimensions can be used for filtering and aggregation.

Dimension Description
lambda_arn Amazon Resource Name (ARN) of the Lambda function instance
aws_region AWS region where the Lambda function is executed
aws_account_id AWS account ID associated with the Lambda function
aws_function_name Name of the Lambda function
aws_function_version Version of the Lambda function
aws_function_qualifier AWS function version qualifier (version or version alias if it is not an event source mapping Lambda invocation)
event_source_mappings AWS function name (if it is an event source mapping Lambda invocation)
aws_execution_env AWS execution environment (e.g. AWS_Lambda_java8)
function_wrapper_version SignalFx function wrapper qualifier (e.g. signalfx-lambda-0.0.5)
metric_source The literal value of ‘lambda_wrapper’

If you want to monitor custom metrics you are sending from your apps, you can create a new dashboard and create charts for those metrics, or you can use Save as to save a copy of the SignalFx Lambda dashboard(s) and then add charts to the copies.