I'm setting Cache-Control:s-maxage=3600 from my Origin server. By this I'm instructing my AWS CloudFront to cache the content for 3600 seconds. I have white listed some cookies and set caching based on the cookie values in CloudFront. This setup is working fine until there is no proxy in between the client and my CloudFront.
If there is Proxy, It also caches a version due to s-maxage header without considering the cookie value. Due to this my end users are seeing irrelevant versions of my web page.
Is there any way to overcome this? Or I need to write a Lambda@edge function to remove this Cache-Control:s-maxage=3600 in Viewer Response?
Cache-Controlheader from the origin and set the CloudFrontDefault TTLto 3600? - Michael - sqlbot