Ensure that Serverless API With Content-Encoding

Serverless API Gateway allows your client to call your API with compressed payloads using one of the supported content codings. Allows this can reduce required bandwidth usage and improve the performance of your API. However, you must configure your API to enable compression of the method response payload.

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


In provider.apiGateway, set minimumCompressionSize be between 0 and 10485760

service: my-service
frameworkVersion: '2'
  name: aws
- minimumCompressionSize: 10485761
+ minimumCompressionSize: 1024

Read more: