CloudFront Turn On Compression
AWS Resource Type:
CloudFront can automatically compress text-based content between 1KB and 10MB in size, resulting in reduced data transfer costs and response times. This opportunity identifies suitable content and enables [compression, which is supported by all modern browsers.
Criteria for Identifying the Opportunity:
CloudFront defines one or more cache behaviors for a given distribution, which apply caching and content delivery policies to content using path-based matching rules. For example, a cache behavior might be configured for `/images/*` that serves images. All distributions include a default cache behavior that matches `*` for any content that does not match other configured cache behaviors.
The following criteria are used to determine if compression can be enabled for each configured CloudFront cache behavior:
- Compression is currently disabled
- Any cache behavior configured with the CachingDisabled managed policy is excluded
- Any cache behavior with a cache policy or cache settings with a default TTL, minimum TTL or maximum TTL of 0 is excluded
Potential savings (range in % on annual basis):
Savings cannot be predicted as they are dependent on the specific content being compressed and content usage patterns.
What happens when the Fixer is executed?
For each cache behavior that qualifies, compression is enabled, with both GZIP and Brotli compression enabled in any associated cache policies. If the cache policy is configured as the CachingOptimizedForUncompressedObjects managed policy, it is changed to the CachingOptimized policy.
Is it possible to rollback once CloudFix implements the fixer?
Yes - the configuration can be manually reverted by disabling compression and associated cache policy compression settings for the affected cache behaviors.
Can CloudFix implement the fix automatically once I accept the recommendation?
Does this fix require downtime?