s3_website
s3_website copied to clipboard
Native Gzip Compression Support for Amazon CloudFront
Now CloudFront has built-in Gzip support: https://aws.amazon.com/blogs/aws/new-gzip-compression-support-for-amazon-cloudfront/
I think now we can simply use some options like this:
cloudfront_distribution_config:
compress: true
I wouldn't take away the existing support though, as there are some downsides to Amazon's builtin compression, like not being able to customise what file types are compressed, and the following:
If you configure CloudFront to compress content, CloudFront removes the ETag response header from the files that it compresses... As a result, when a compressed file expires and CloudFront forwards another request to your origin, your origin always returns the file to CloudFront instead of an HTTP status code 304 (Not Modified). (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/ServingCompressedFiles.html)
Can still add the option though.