Live data from Hacker News

Hosting your static site with AWS S3, Route 53, and CloudFront for free

vickylai.com

41–50 of 51 posts

Re: Hosting your static site with AWS S3, Route 53, and CloudFront for free

#41
Shameless plug, but if you're trying to avoid eating into your free tier, I documented GitHub pages + Cloudflare for the same effect. Just turn your Cloudflare cache to super high, and GitHub shouldn't ever get any real load.

I gave an example of running a React app[1]

[1]: https://www.toptal.com/github/unlimited-scale-web-hosting-gi...

Re: Hosting your static site with AWS S3, Route 53, and CloudFront for free

#42
post #31

The article's from December 2017 and you can see from the response headers that it's hosted on GitHub Pages again. There are plenty of gotchas when serving a static site via CloudFront. Let's say you have a page at example.com/foo/index.html. If you want it serve it from example.com/foo/ then you need to write a Lambda@Edge request function to handle the directory index — the article implies that CloudFront's default…

To get default index.html files to serve properly, use the http url from the static site pane in your s3 bucket setup. Don't use the bucket listed in the drop-down on cloudfront. Then it will work properly. You don't need a lambda function.

Re: Hosting your static site with AWS S3, Route 53, and CloudFront for free

#43
If you use cloudflare instead of cloudfront and route53, you don’t have to pay the $.50/mo for dns, but much more importantly you get free bandwidth from cloudflare, and will pay next to nothing in s3 costs if you cache liberally with cloudflare at the cdn level.

Re: Hosting your static site with AWS S3, Route 53, and CloudFront for free

#44
Your website doesn't have to be static to host it for free on AWS. You can do server side stuff with Lambda and if you can get away with the 128MB instance (easy enough to do for one function) you get 1 million request a month for free and 888 hours of processing time. (https://aws.amazon.com/lambda/pricing/). The free tier for Lambda doesn't expire.

The only free hosted database that I am aware of is Mongo Atlas a 3 Node cluster with 500MB oh storage.

Re: Hosting your static site with AWS S3, Route 53, and CloudFront for free

#45

Your website doesn't have to be static to host it for free on AWS. You can do server side stuff with Lambda and if you can get away with the 128MB instance (easy enough to do for one function) you get 1 million request a month for free and 888 hours of processing time. ( https://aws.amazon.com/lambda/pricing/ ). The free tier for Lambda doesn't expire. The only free hosted database that I am aware of is Mongo Atlas a…

But wouldn't ApiGateway will be more expensive than Cloudfront+S3?

Re: Hosting your static site with AWS S3, Route 53, and CloudFront for free

#46
post #28

Earlier quoted context omitted.

Typically, you restrict countries that you receive abusive traffic from and do not have any business in. "Is that how you want the web to generally work?" My suggestions on ways to prevent paying for CloudFront charges from junk requests are not prescriptive. However, they are AWS best practices when dealing with DDoS. https://aws.amazon.com/answers/networking/aws-ddos-attack-mi...

Guess we're living very different lives on the same web. "do not have any business in." is not something I'm familiar with on the web, as the part of the web I love is the one without borders. But each to their own :)

As an American expat living in Vietnam, I find it annoying when companies decided they "do not have any business" where I live.

For example, if I want to purchase southwest airline tickets, I have to use a VPN.

Re: Hosting your static site with AWS S3, Route 53, and CloudFront for free

#49
post #46
post #28

Earlier quoted context omitted.

Guess we're living very different lives on the same web. "do not have any business in." is not something I'm familiar with on the web, as the part of the web I love is the one without borders. But each to their own :)

As an American expat living in Vietnam, I find it annoying when companies decided they "do not have any business" where I live. For example, if I want to purchase southwest airline tickets, I have to use a VPN.

Tell me about it! I'm Swedish, I live in Spain but I prefer all my technology text (OS language, websites and everything) to be in English. But services don't realize this. So to buy from Apple, I need to be on the Spanish website, that doesn't offer a English version, while the Swedish version does offer English, even though they have exactly the same content and everything looks the same... Same goes for almost all shops, Amazon, PSN, AppStore, Google Play and so on. The world is not ready for a global web it seems.

Off-topic but interesting anyways, I've noticed that people who move from the US to elsewhere, often call themselves "expats", while people who move from elsewhere to the US, are called "immigrants". Why is that?

Re: Hosting your static site with AWS S3, Route 53, and CloudFront for free

#50
post #45

Your website doesn't have to be static to host it for free on AWS. You can do server side stuff with Lambda and if you can get away with the 128MB instance (easy enough to do for one function) you get 1 million request a month for free and 888 hours of processing time. ( https://aws.amazon.com/lambda/pricing/ ). The free tier for Lambda doesn't expire. The only free hosted database that I am aware of is Mongo Atlas a…

But wouldn't ApiGateway will be more expensive than Cloudfront+S3?

Good point, API Gateway is $3.50 per 1 million requests after the first year. Data out is .09 - .12 per gigabyte depending on the region.
Post reply on HN