All checks
Low Lambda · regional

Lambda functions should have AWS X-Ray active tracing enabled

Checks that active tracing with AWS X-Ray is enabled for the Lambda function. X-Ray breaks down each traced invocation's latency, which helps diagnose errors, bottlenecks and timeouts and shows how data flows through the function. Lambda@Edge functions cannot use X-Ray, so they always fail.

service
Lambda
severity
Low
scope
evaluated in every region

How to fix it

In the console

Lambda → Functions → the function → Configuration → Monitoring and operations tools → Additional monitoring tools

Lambda service traces
Enable (tracing mode Active)
Execution role
For the CLI or Terraform, attach AWSXRayDaemonWriteAccess; the console adds the permissions itself
Aliases
Publish a new version and point each alias at it; published versions keep the old tracing mode

With the AWS CLI

aws lambda update-function-configuration --function-name <function-name> --tracing-config Mode=Active --region <region>

With Terraform

resource "aws_lambda_function" "this" {
  function_name = var.function_name
  role          = var.execution_role_arn
  filename      = var.deployment_package

  tracing_config {
    mode = "Active"
  }
}

See which of your accounts this check is failing on.

Book a live scan