Ensure Serverless Framework API X-Ray Tracing Is Enabled

Serverless Framework API Gateway is a way of creating and managing RESTful APIs without provisioning or managing servers.
X-Ray Tracing is a way of analyzing and debugging production and distributed applications.
You can enable X-Ray Tracing for your Serverless API Gateway by adding a tracing property to your provider section in your serverless.yml file.

One possible reason you should enable X-Ray Tracing for your Serverless Framework API Gateway is to gain insight into the performance and behavior of your serverless application.
With X-Ray Tracing, you can trace user requests through your API Gateway and Lambda functions, identify bottlenecks and errors, monitor service health and latency, and optimize your code and resources1.

Risk Level: medium
Platform: AWS Serverless
Spectral Rule ID: SLFW009

REMEDIATION

In provider.tracing, set apiGateway to 'true'

service: my-service
frameworkVersion: '2'
provider:
  name: aws
  tracing:
-   apiGateway: false
+   apiGateway: true

Read more: