CloudFront Turn on Compression
AWS Resource Type:
AWS CloudFront can automatically compress text-based data between 1KB and 10MB, resulting in reduced data egress costs. The compression will only occur if the client states it can handle compressed data, and if the source data is uncompressed.
Criteria for identifying the opportunity:
We only want to enable compression when it is safe to do so.
CloudFix will NOT enable compression if
- The cache policy is Managed (“CachingDisabled”)
We will enable CloudFront compression if
- There are no caching and compression policies
- The existing cache policies allow compressed files
Potential savings (range in % on annual basis):
The cost savings depend on the data and content your distributions are serving, and if the cache policies are compatible with compression. Based on our own experience, you can save up to 65% on your egress costs.
What happens when the Fixer is executed?
The fixer will enable compression for all CloudFront distributions matching the fixer criteria.
This fixer excludes any cases where compression might conflict with existing caching policies. In all other cases, enabling compression is risk-free: CloudFront only compresses data, if the client can handle compressed data.
Is it possible to rollback once CloudFix implements the fixer?
Manual rollback on your AWS account is possible. One-click rollback via CloudFix for this opportunity is currently not available.
Can CloudFix implement the fix automatically once I accept the recommendation?
Yes. OpenSearch domain storage resizing is automatic – once you accept the recommendation and schedule the fix, execution is automatic.
Does this fix require downtime?
No. It takes 15-20 minutes for the configuration changes to take effect, but CloudFront will serve the data using the previous configuration and seamlessly switch over to the new configuration.
Do it yourself (DIY) Instructions:
If you have CloudFix subscription, CloudFix will execute these automatic cost savings for you. However, if you'd like to do it yourself - please follow these instructions:
|Finding cost saving recommendations with CloudFix is FREE! You'll need a paid subscription only if you'd like CloudFix to execute those recommendations.|
- Open the AWS CloudFront console and select the distributions list
- For each distribution, click on the distribution ID
- Check the behavior details to determine if there is no cache policy. If a policy is selected, make sure it matches the fixer criteria
Select the behavior entry and click Edit
Set Compress objects automatically to Yes
- Save changes
- Allow for some time for the changes to take effect, normally 15-20 minutes.