In CHAPTER 6.6, Scott says "dynamic content delivery is achieved using HTTP cookies forwarded from your origin"… So, is this the final "result" when I set, for example, S3 objects with a TTL=0 header? Is this the result of a "no-cache" configuration on CloudFront itself? I understand both are valid options, besides choosing to "Forward all cookies to your origin". But notice that Scotts says "FROM" origin, and not "TO" origin. I am a bit confused here… Any guidance? In short, how can I configure CloudFront to serve dynamic content (for instance, from API Gateway) – alternatives and pros/cons.
Dynamic content would be like webpages that were generated by PHP, ASP or a Java process for example…. The URL may be the same, but the page content would be different. I can’t think of an example where you’d have dynamic content coming from an S3 bucket because there’s no server-side processes to render a page dynamically.
Also, for what it’s worth, API Gateway already uses CloudFront behind the scenes so no real need to create a Cloudfront distro in front of an API Gateway deployment for performance reasons. You could use WAF and CloudFront though for extra DDOS protection I suppose.