LOW
Source
Trivy
ID
AVD-AWS-0111

SAM API must have X-Ray tracing enabled

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

Impact

Without full tracing enabled it is difficult to trace the flow of logs

Follow the appropriate remediation steps below to resolve the issue.

Enable tracing

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
---
AWSTemplateFormatVersion: "2010-09-09"
Description: A sample template
AWSTemplateFormatVersion: 2010-09-09
Description: Good Example of SAM API
Resources:
  ApiGatewayApi:
    Type: AWS::Serverless::Api
    Properties:
      Name: Good SAM API example
      StageName: Prod
      TracingEnabled: true