Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Cache invalidations are the ones that will really get you bad in CloudFront if you're not careful [1].

As a new user, I was working on publishing open source documentation via CloudFront (https://tmuxp.git-pull.com) and made a mistake of invalidating '*', and doing it every time I pushed to CI. This was sphinx-doc, so no cache-busting filenames.

My bill was absolutely enormous. I chewed threw the free tier credits.

If CloudFront ever gets more generous with invalidations, that'd help reduce the sting for those of us that make those early mistakes.

[1] https://docs.aws.amazon.com/AmazonCloudFront/latest/Develope...



Pro tip : for such scenarios (push static documentation), services such as Netlify, Cloudflare Pages, Firebase Hosting are preferable. Their costs are lower, free tiers are highly generous, and cache invalidation is handled automatically.


I've tried AWS amplify and some cloudflare pages. I'm looking into some of those others for gatsby / next.js hosting.

For gatsby sites and webpack apps, I did ultimately figure out and simplify my s3 / cloudfront deploys and only invalidate index.html.

Ultimately it looks like I'm going to be migrating away to sphinx-doc. It's not up to date with the best practices in static site apps these days.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: