LOW
Source
Trivy
ID
AVD-AWS-0003

API Gateway must have X-Ray tracing enabled

X-Ray tracing enables end-to-end debugging and analysis of all API Gateway HTTP requests.

Impact

Follow the appropriate remediation steps below to resolve the issue.

Enable tracing

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
resource "aws_api_gateway_rest_api" "test" {

}

resource "aws_api_gateway_stage" "good_example" {
  stage_name           = "prod"
  rest_api_id          = aws_api_gateway_rest_api.test.id
  deployment_id        = aws_api_gateway_deployment.test.id
  xray_tracing_enabled = true
}