5 ms·
Show HN: Simple CDN backed static website in AWS
- jamjamjamjamjam 5y agoWhy not use github actions and github pages? Free and easier, all in one place with one account.
- mulmboy 5y agoWhat's novel about this? And why use it over any of the more polished/simplified offerings like netlify?
- tylergetsay 5y agoIt's probably cheaper
- lifebeyondfife 5y agoNothing particularly novel but the setup of configuring CloudFront to connect to S3 and handle SSL termination, a DNS record pointing to CloudFront, an S3 bucket to hold the contents, an S3 bucket security policy which restricts access just to CloudFront... well, it's complex and easy to misconfigure. In terms of pricing, you can store 1GB in S3 for a year for a fraction of a dollar. The majority of the cost comes from CloudFront. Unless you have serious traffic, this is extremely cheap: https://aws.amazon.com/cloudfront/pricing/ https://aws.amazon.com/cloudfront/pricing/ The interface (just put files in S3) suits me. I have a site where I deploy and invalidate the CloudFront cache in a GitHub Action: https://github.com/lifebeyondfife/whisky-menu/blob/master/.github/workflows/main.yml https://github.com/lifebeyondfife/whisky-menu/blob/master/.g...
- iSloth 5y agoIs there any advantage to this over something like cloudflare pages?
- lifebeyondfife 5y agoCloudflare Pages looks like a more productionised version of this, yes. In terms of advantages, I'd say price, and the maturity of using AWS. I deploy a static site with a GitHub Action (look at my other repo whisky-menu for how to do this) which builds a React app, copies it to S3, and invalidates the CloudFront cache.
- iSloth 5y agoPrice?... Cloudflare is completely Free, so surely it beats AWS on cost?
- lifebeyondfife 5y agoYou're correct, yes, I didn't realise how generous the free tier is. If you're doing fewer than 500 updates per month, Cloudflare looks good https://pages.cloudflare.com/ https://pages.cloudflare.com/ Because I have other resources and projects in AWS I'll keep this setup. It's so close to free that cost doesn't bother me.
- hilalh 5y agoWhy not use Amplify Console for hosting with a CDN?
- lifebeyondfife 5y agoFamiliarity with S3, Route53, and CloudFront was a draw for me personally. AWS is all about abstractions. Some of them are worth learning but increasingly there's a wall of options in AWS and, for me, it's not worth spending time staying on top of all of them. The few services needed for this setup are some of the most popular and will be there in the future.
- sgallant 5y agoVery cool. Thanks for sharing this.