Jump to content

Amazon S3 Cloudfront- Accept Headers

Recommended Posts


I've recently set up S3 and Cloudfront which has been a bit of a nightmare getting the CName URL right so objects don't keep disappearing after a few days. The help section here is out of date and missing the Cloudfront aspect. I was referrred to the out of date video in one ticket.

If anyone has any tips on this, they would be appreciated. I have the bucket set up as bucketname/IPS/ and on some of my sites it seems fine, others I have to keep moving everything back back to my main server as all the Gallery images, emoticons etc because things start disappearing after a few days. 

Secondly, GTMetrix is reporting this in respect of my CDN:


The following publicly cacheable, compressible resources should have a "Vary: Accept-Encoding" header:

I have added Accept-Encoding into the Cloudfront Origin's Header Name field, but no joy.

Little help, please?

Many thanks.

Link to comment
Share on other sites

Thanks Adlago, I'd actually read that earlier this week. I've read through it again and although it's now several years old, it seems Amazon we're against supporting serving gzipped or standard content via  S3, because they were of the belief they were following the intended header specification, and referred it instead to Google/Pagespeed. 

It seems to be more of a Cloudfront issue in terms of forwarding the appropriate header request to S3 and Amazon seem to have done work on this but for some reason it's still not straightforward, even in 2018.

I did find this:


and then this technique Lambda@Edge Origin Response trigger workaround



Then some Cloudfront documentation at


I'll need a few more beers before tackling any of the above!

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...