'Disabling X-ray tracking in lambda using terraform

I have a bunch of lambdas that were created using terraform with X-ray tracking enabled. now I need to disable the X-ray tracking in that lambda. It would be great if someone could help me.



Solution 1:[1]

I don't think we can turn it off completely. You can play with different values for the tracing_config in your terraform config.

Checkout the link - tracing_config

resource "aws_lambda_function" "service" {
  # Your usual aws_lambda_function configuration settings here

  tracing_config {
    mode = "Active"
  }
}

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Satya S