Lurker News
This is more of a thought experiment, I know a multitude of ways to do this which require loads of setup, jumping through AWS hoops, etc. I'd like ideally way to deploy to a hosted service with a single command. Imagine Heroku but even easier.

Comments (487) 172 threads

Earlier comments
toastal1 reply#
I can't say I'd second it -- at least not for anything outside of demos. You can't set custom headers which means you can set the recommended OWASP security headers and you'll get an F score on Mozilla Observatory. This will also not let you set proper caching headers which can mess with performance or just be incorrect like with service workers. A small additional nitpick is that you will need to do your own gzip and brotli compression instead of that being done by default (which is easy to forget about, but at least it gives you the flexibility to support Brotli and future formats like zstd whereas other providers you only get what they decide).
toastal#
can't* set
pgroves3 replies#
I have my site in an S3 bucket with the static-site flag activated. It would not win for 'easiest'. However, it's the only thing in my personal AWS account right now and my monthly bill is $0.83
crazypython6 replies#
An S3 bucket is intended as storage, not retrieval. Downloading from S3 means grabbing shards. You should put a proper CDN, like CloudFront or Cloudflare, in front.
Diederich2 replies#
> You should put a proper CDN, like CloudFront or Cloudflare, in front.

I understand what you're saying, but why? I assume the site in question is pretty low volume. What's wrong with serving directly from S3?

viraptor#
You can't get https on S3. Also many interesting headers are only available via cloudfront.

Also you get a little bit of protection from someone sending lots of traffic to make you spend $$$

erikmolin5 replies#
Why, if his monthly bill is 83 cents, and he values his time? Does not using a CDN impact performance in a crippling way that neither me nor the poster you're replying to understands?
philistine4 replies#
The big gain with putting Cloudfront in front of it is you can have HTTPS.

Continue this thread — 4 replies

nrmitchi3 replies#
Performance maybe a little bit, but IIRC you, as the owner of the bucket, pay for bandwidth out.

Putting it being a CDN protects you (at least a little bit) from the possibility of a huge bandwidth bill at the end of the month if someone realizes they can attack your wallet directly by trying to ddos your site.

Continue this thread — 3 replies

crazypython#
> Does not using a CDN impact performance in a crippling way that neither me nor the poster you're replying to understands?

It adds up to 600ms of latency for each roundtrip. A modern website without link rel=preload is several roundtrips– download HTML page, then do JS requests and CSS, so that's ~1.2s of additional latency.
Because he succumbed to AWS' marketing. Surge, mentioned downthread, lets you deploy a folder for free on a worldwide CDN with virtually no setup.

pgroves#
I don't think it matters much b/c of the super low volume but I do have it behind Cloudflare free-tier.
imgabe2 replies#
It takes like 30 seconds to point a Cloudfront distribution at an S3 bucket. Maybe a couple minutes more to set up the domain.

Continue this thread — 2 replies

dave_sid4 replies#
Pfffffft. It’s probably a personal site with 10 visitors a week. Let’s step back a little here.
cphajduk#
And 9 of them are just bots.
pgroves#
This is correct. Why would I put any more effort into it?
gabeio#
Cloudflare at minimum it's free as well and will protect you from bad actors which will save you $ if someone starts an infinite loop requesting your site.
erichurkman1 reply#
Let's be real here.

He clearly needs kubernetes.

Continue this thread — 1 reply

blacha#
You can generally query any object off s3 in a few milliseconds..

I have a system doing 10s-100's of millions of reads a day from s3 with very consistent and fast read times.

maest#
You can use CloudFront with an S3-backed static website.
miyuru#
I agree, S3 is only storage. S3 even does not support gzip compression.

If you are hosting a website in s3, please put a CDN with gzip support in front.

banana_giraffe2 replies#
Cheapest however, is out the window.

I mean, if there's a chance, however remote, that you might end up as the #1 of reddit or whatever, stay away from S3. Your site won't go down, but oh god, you pay for that.

rantwasp#
yeah no. even if it gets wildly popular over night you'll only pay a few dollars
statictype#
This terraform script takes it from 'stupidly complicated' to really really easy: cloudmaniac/static-website/aws
nknealk#
Seconding render. I host a Hugo site with them. Their free tier is pretty feature-rich and I love the automated builds. My site is set up so that any push to the main branch on a private github repo gets automatically checked out, compiled to HTML, and updated on their CDN.
sevencolors1 reply#
Yeah loving their setup. Very Heroku-like. Free for static hosts and almost as cheap as Digital Ocean for servers
da39a3ee#
I'm using them for a rust rocket site, and about to for a django/vue thing. It's extremely slick and easy to get going. But they are just personal projects. I haven't thought about whether it would be suitable for a prod deploy, or how I'd do something like take django down while database migrations are running on deploy.
digianarchist#
Looks similar to Digital Ocean App Platform except they have much better bandwidth allowances, apex to www subdomain direction, cron jobs and persistent disk.
maxk421 reply#
The most popular currently is probably https://www.netlify.com/ - 100% free.

If AWS + CloudFront is too difficult and you don't mind spending a few bucks, it's pretty easy to get started with LightSail - about $3.50 a month.

enhdless1 reply#
Specifically Netlify Drop: https://app.netlify.com/drop

You don't even need to create an account, just upload a zip of your files.

mcintyre1994#
You don’t even have to zip it!

Load more comments