Free plan Signups are open now. The full audytx engine — Terraform and CloudFormation — is live. The Free plan is 100 scans a month and stays free — paid tiers arrive Nov 01, 2026 from $20/month for unlimited repositories. Try it on your own code.

CloudFront distribution has compression turned off

AWS_OPS_050 LOW Cost

What it checks

CloudFront distribution has compression turned off

Where it applies

Terraform: aws_cloudfront_distribution

CloudFormation: AWS::CloudFront::Distribution

How to fix it

  1. Inspect the default behavior's content and origin Content-Encoding before enabling compression. CloudFront compresses eligible content types with a Content-Length of 1,000-10,000,000 bytes and response status 200, 403 or 404; compressed origin responses are passed through. Client encoding negotiation matters, and already cached objects are not recompressed by a flag change. Compression remains best-effort.
  2. For eligible responses, review the existing Terraform default_cache_behavior.compress or CloudFormation DefaultCacheBehavior.Compress. When a cache policy is attached, enable gzip and/or Brotli in its encoding settings (EnableAcceptEncodingGzip / EnableAcceptEncodingBrotli) as appropriate. Validate behavior and refresh cached objects when needed; compare measured bytes and the pay-as-you-go or flat-rate plan before estimating savings.

Frameworks

These mappings are advisory, not an attestation of compliance.

Vendor documentation

All rules