Enable Application Signals on Lambda functions - Amazon CloudWatch

Enable Application Signals on Lambda functions

You can enable Application Signals for your Lambda functions. This way your function sends metrics to Application Signals, which you can use to monitor your application's health and track it's long-term performance against your business objectives.

When you enable this, Application Signals automatically instruments your Lambda functions using enhanced AWS Distro for OpenTelemetry (ADOT) libraries, provided via a Lambda layer. This Lambda layer packages and deploy the libraries that are required for auto-instrumentation for Application Signals.

In addition to supporting Application Signals, this Lambda layer is also a component of Lambda OpenTelemetry support and provides tracing functionality.

Getting started

There are three methods for enabling Application Signals for your Lambda functions.

After you enable Application Signals for a Lambda function, it takes a few minutes for telemetry from that function to appear in the Application Signals console.

  • Use the CloudWatch Application Signals console

  • Use the Lambda console

  • Manually add the Application Signals layer to your Lambda function runtime.

Each of these methods adds an AWS Distro for OpenTelemetry layer to your function.

Use the CloudWatch Application Signals console

Use these steps to use the Application Signals console to enable Application Signals for a Lambda function.

To enable Application Signals for a Lambda function using the Application Signals console
  1. Open the CloudWatch console at https://console.aws.amazon.com/cloudwatch/.

  2. In the navigation pane, choose Application Signals, Services.

  3. In the Services list area, choose Enable Application Signals.

  4. Choose the Lambda tile.

  5. Select each function that you want to enable for Application Signals, and then choose Done.

Use the Lambda console

Use these steps to use the Lambda console to enable Application Signals for a Lambda function.

To enable Application Signals for a Lambda function using the Lambda console
  1. Open the AWS Lambda console at https://console.aws.amazon.com/lambda/.

  2. In the navigation pane, choose Functions and then choose the name of the function that you want to enable.

  3. Choose the Configuration tab, and then choose Monitoring and operations tools.

  4. Choose Edit.

  5. In the CloudWatch Application Signals and X-Ray section, select both Automatically collect application traces and standard application metrics with Application Signals and Automatically collect Lambda service traces for end to end visibility with X-Ray..

  6. Choose Save.

Manually enable Application Signals

Use these steps to manually enable Application Signals for a Lambda function.

To manually enable Application Signals for a Lambda function
  1. Add the Application Signals Lambda layer to your Lambda runtime. To find the layer ARN, see Application Signals Lambda layer ARNs.

  2. Add the environment variable AWS_LAMBDA_EXEC_WRAPPER=/opt/otel-instrument

  3. Attach the AWS managed IAM policy CloudWatchLambdaApplicationSignalsExecutionRolePolicy to the Lambda execution role.

  4. (Optional) We recommend that you enable Lambda active tracing to get a better tracing experience. For more information, see Visualize Lambda function invocations using AWS X-Ray.

Manually disable Application Signals

Use these steps to manually disable Application Signals for a Lambda function.

To manually disable Application Signals for a Lambda function, remove the Application Signals Lambda layer from your Lambda runtime, and remove the AWS_LAMBDA_EXEC_WRAPPER=/opt/otel-instrument environment variable.

Application Signals Lambda layer ARNs

The following tables lists the ARNs to use for the Application Signals Lambda layer for each Region where it's supported.

Python
Region ARN

US East (N. Virginia)

arn:aws:lambda:us-east-1:615299751070:layer:AWSOpenTelemetryDistroPython:5

US East (Ohio)

arn:aws:lambda:us-east-2:615299751070:layer:AWSOpenTelemetryDistroPython:5

US West (N. California)

arn:aws:lambda:us-west-1:615299751070:layer:AWSOpenTelemetryDistroPython:12

US West (Oregon)

arn:aws:lambda:us-west-2:615299751070:layer:AWSOpenTelemetryDistroPython:12

Africa (Cape Town)

arn:aws:lambda:af-south-1:904233096616:layer:AWSOpenTelemetryDistroPython:5

Asia Pacific (Hong Kong)

arn:aws:lambda:ap-east-1:888577020596:layer:AWSOpenTelemetryDistroPython:5

Asia Pacific (Hyderabad)

"arn:aws:lambda:ap-south-2:796973505492:layer:AWSOpenTelemetryDistroPython:5

Asia Pacific (Jakarta)

arn:aws:lambda:ap-southeast-3:039612877180:layer:AWSOpenTelemetryDistroPython:5

Asia Pacific (Melbourne)

arn:aws:lambda:ap-southeast-4:713881805771:layer:AWSOpenTelemetryDistroPython:5

Asia Pacific (Mumbai)

arn:aws:lambda:ap-south-1:615299751070:layer:AWSOpenTelemetryDistroPython:5

Asia Pacific (Osaka)

arn:aws:lambda:ap-northeast-3:615299751070:layer:AWSOpenTelemetryDistroPython:5

Asia Pacific (Seoul)

arn:aws:lambda:ap-northeast-2:615299751070:layer:AWSOpenTelemetryDistroPython:5

Asia Pacific (Singapore)

arn:aws:lambda:ap-southeast-1:615299751070:layer:AWSOpenTelemetryDistroPython:5

Asia Pacific (Sydney)

arn:aws:lambda:ap-southeast-2:615299751070:layer:AWSOpenTelemetryDistroPython:5

Asia Pacific (Tokyo)

arn:aws:lambda:ap-northeast-1:615299751070:layer:AWSOpenTelemetryDistroPython:5

Canada (Central)

arn:aws:lambda:ca-central-1:615299751070:layer:AWSOpenTelemetryDistroPython:5

Europe (Frankfurt)

arn:aws:lambda:eu-central-1:615299751070:layer:AWSOpenTelemetryDistroPython:5

Europe (Ireland)

arn:aws:lambda:eu-west-1:615299751070:layer:AWSOpenTelemetryDistroPython:5

Europe (London)

arn:aws:lambda:eu-west-2:615299751070:layer:AWSOpenTelemetryDistroPython:5

Europe (Milan)

arn:aws:lambda:eu-south-1:257394471194:layer:AWSOpenTelemetryDistroPython:5

Europe (Paris)

arn:aws:lambda:eu-west-3:615299751070:layer:AWSOpenTelemetryDistroPython:5

Europe (Spain)

arn:aws:lambda:eu-south-2:490004653786:layer:AWSOpenTelemetryDistroPython:5

Europe (Stockholm)

arn:aws:lambda:eu-north-1:615299751070:layer:AWSOpenTelemetryDistroPython:5

Europe (Zurich)

arn:aws:lambda:eu-central-2:156041407956:layer:AWSOpenTelemetryDistroPython:5

Israel (Tel Aviv)

arn:aws:lambda:il-central-1:746669239226:layer:AWSOpenTelemetryDistroPython:5

Middle East (Bahrain)

arn:aws:lambda:me-south-1:980921751758:layer:AWSOpenTelemetryDistroPython:5

Middle East (UAE)

arn:aws:lambda:me-central-1:739275441131:layer:AWSOpenTelemetryDistroPython:5

South America (São Paulo)

arn:aws:lambda:sa-east-1:615299751070:layer:AWSOpenTelemetryDistroPython:5

Node.js
Region ARN

US East (N. Virginia)

arn:aws:lambda:us-east-1:615299751070:layer:AWSOpenTelemetryDistroJs:5

US East (Ohio)

arn:aws:lambda:us-east-2:615299751070:layer:AWSOpenTelemetryDistroJs:5

US West (N. California)

arn:aws:lambda:us-west-1:615299751070:layer:AWSOpenTelemetryDistroJs:5

US West (Oregon)

arn:aws:lambda:us-west-2:615299751070:layer:AWSOpenTelemetryDistroJs:5

Africa (Cape Town)

arn:aws:lambda:af-south-1:904233096616:layer:AWSOpenTelemetryDistroJs:5

Asia Pacific (Hong Kong)

arn:aws:lambda:ap-east-1:888577020596:layer:AWSOpenTelemetryDistroJs:5

Asia Pacific (Hyderabad)

"arn:aws:lambda:ap-south-2:796973505492:layer:AWSOpenTelemetryDistroJs:5

Asia Pacific (Jakarta)

arn:aws:lambda:ap-southeast-3:039612877180:layer:AWSOpenTelemetryDistroJs:5

Asia Pacific (Melbourne)

arn:aws:lambda:ap-southeast-4:713881805771:layer:AWSOpenTelemetryDistroJs:5

Asia Pacific (Mumbai)

arn:aws:lambda:ap-south-1:615299751070:layer:AWSOpenTelemetryDistroJs:5

Asia Pacific (Osaka)

arn:aws:lambda:ap-northeast-3:615299751070:layer:AWSOpenTelemetryDistroJs:5

Asia Pacific (Seoul)

arn:aws:lambda:ap-northeast-2:615299751070:layer:AWSOpenTelemetryDistroJs:5

Asia Pacific (Singapore)

arn:aws:lambda:ap-southeast-1:615299751070:layer:AWSOpenTelemetryDistroJs:5

Asia Pacific (Sydney)

arn:aws:lambda:ap-southeast-2:615299751070:layer:AWSOpenTelemetryDistroJs:5

Asia Pacific (Tokyo)

arn:aws:lambda:ap-northeast-1:615299751070:layer:AWSOpenTelemetryDistroJs:5

Canada (Central)

arn:aws:lambda:ca-central-1:615299751070:layer:AWSOpenTelemetryDistroJs:5

Europe (Frankfurt)

arn:aws:lambda:eu-central-1:615299751070:layer:AWSOpenTelemetryDistroJs:5

Europe (Ireland)

arn:aws:lambda:eu-west-1:615299751070:layer:AWSOpenTelemetryDistroJs:5

Europe (London)

arn:aws:lambda:eu-west-2:615299751070:layer:AWSOpenTelemetryDistroJs:5

Europe (Milan)

arn:aws:lambda:eu-south-1:257394471194:layer:AWSOpenTelemetryDistroJs:5

Europe (Paris)

arn:aws:lambda:eu-west-3:615299751070:layer:AWSOpenTelemetryDistroJs:5

Europe (Spain)

arn:aws:lambda:eu-south-2:490004653786:layer:AWSOpenTelemetryDistroJs:5

Europe (Stockholm)

arn:aws:lambda:eu-north-1:615299751070:layer:AWSOpenTelemetryDistroJs:5

Europe (Zurich)

arn:aws:lambda:eu-central-2:156041407956:layer:AWSOpenTelemetryDistroJs:5

Israel (Tel Aviv)

arn:aws:lambda:il-central-1:746669239226:layer:AWSOpenTelemetryDistroJs:5

Middle East (Bahrain)

arn:aws:lambda:me-south-1:980921751758:layer:AWSOpenTelemetryDistroJs:5

Middle East (UAE)

arn:aws:lambda:me-central-1:739275441131:layer:AWSOpenTelemetryDistroJs:5

South America (São Paulo)

arn:aws:lambda:sa-east-1:615299751070:layer:AWSOpenTelemetryDistroJs:5

Enable transaction search

You can enhance Lambda observability by using transaction search, which enables the capture of all trace spans for Lambda function invocation without sampling. This feature allows you to collect 100% of the spans for your functions, unaffected by the sampled flag in trace context propagation. This ensures that there is no additional impact to downstream dependent services. By enabling transaction search on Lambda, you gain complete visibility into your function performance and you can troubleshoot rarely occurring issues. To get started, see Transaction Search.