Hacker News new | ask | show | jobs
by throwaway2016a 3492 days ago
Just to echo... Amazon S3 with CloudFront. No contest. CloudFront has free SSL too. Then AWS Lambda to provide dynamic content via Javascript / API if needed.

If you want to get fancy you can even attach it to your domain root (example.com vs www.example.com) using Route53. Which is impossible with many static hosts. Although that requires a hosted Route53 zone which at $2 might very well be 100x your hosting costs.

I use Jenkins to generate the website itself.

Edit: Only downside is if your traffic spikes you have no control over the cost. There is no upper bounds. With that said, it would take a tremendous amount of traffic to balloon the costs to anything worth worrying about. And at least you can be sure your website will actually stay up.

3 comments

> Just to echo... Amazon S3 with CloudFront. No contest.

Yeah, until someone decides they don't like you and downloads a few terabytes of data over and over. It costs about average $0.09 per GB from CloudFront out to the world, and add in the costs from S3 to Cloudfront itself.

I had a $200 bill one month due to that, and the next month went with CloudFlare (no usage based billing) and github.

I addressed that partially with.

> Only downside is if your traffic spikes you have no control over the cost. There is no upper bounds. With that said, it would take a tremendous amount of traffic to balloon the costs to anything worth worrying about. And at least you can be sure your website will actually stay up.

However, proper use of cache headers can help with that since Cloudfront respects them and won't hit S3 again if the header isn't expired. So at least that helps.

The scenario you described is my nightmare scenario.

Also, Cloudfront now has a WAF (Web Application Firewall) that can help with this. Although it too has some costs.

Edit:

Another alternative that is pretty straight forward although non-zero work is to set up a CloudWatch alarm on your monthly bill and when it gets to high make an API call to shut off the cloudfront distribution (cloudwatch can trigger SNS which can trigger Lambda which can make the API call).

It's a PITA but worth it to save hundreds.

If I may ask a simple question which reveals my ignorance about AWS and anything too technical, but what is the actual CMS being used for a website hosted on Amazon? Take a simple website with text and images that you want to update via an easy to use CMS, what is the AWS service that is the CMS seen by a user looking after the website? Does one exist or is it a matter of needing to make such a CMS?

Edit: thanks for the replies. I had a feeling AWS was more a "parts" bin rather than anything approaching a ready-to-go hosting + CMS, but thought I'd check.

The parent question was about static site hosting so one would likely use a static site generator like Jekyll.

If you want a CMS you need to either install it on a server (via Amazon EC2) or use a serverless product like AWS Lambda (which lets you run functions on demand.

But with a static site generator you will usually run and test your site locally before it generates static .html files and pushes to S3. But S3 just hosts static content. The only thing it can do that approaches anything dynamic are redirects. You can also lock down permissions by role but you wouldn't want to do that for a public static site.

There is no single answer - AWS isn't a single hosting service, but instead more of a "parts bin" that you can use to build simple or complex services.

I don't think it's what you're looking for in this case.

Amazon offers basically hardware. You rent a piece of server resourses. What operating system, what CMS you use is up to you, but prepeared to install and configure everything.

But, they also offer plenty of free (and good) "ready made and pre configured" packages for people to use (for exampe wordpress, bitbucket etc.). You can search them here https://aws.amazon.com/marketplace/

> Amazon offers basically hardware.

AWS is way more than hardware.

Lambda - on demand code execution

Route53 - DNS and domain registration

S3 - File storage with redundancy and an HTTP interface

RDS - Managed relational databases

DynamoDB - NoSQL key/value store with indexing and scanning

SQS - Job queue-ing without needing to manage servers

SES - Email service with the ability to both send and receive email and also trigger a Lambda function when email is received

SNS - Fan out notifications with multiple destinations (iOS, Android, Email, SMS, webhook, etc)

IAM KMS - Manage your encryption keys

EC2 - Ok, this one actually is hardware

Git hosting, docker file hosting. Etc...

That is just off the top of my head. However, if you want to avoid vendor lock-in, then yes, it is just hardware.

You are correct. They are also huge ecommerce site and book store.

I understood previous question as "What CMS amazon is offering for clients in website hosting", to where I think my answer still stands.

> They are also huge eCommerce site and book store.

That is a complete miss-categorization. Amazon AWS is a single business unit with EC2 being a single product inside of it. When people say Amazon Web Services it very clearly means more than just EC2.

To compare EC2 to SQS (simple queuing service) and saying they are different is the same as comparing Amazon Book sales to Amazon Clothing Sales. It is a distinction that not many people would make.

Actually in a way it is more like saying that Amazon Selling the Twilight novels is different than Amazon selling college textbooks.

I use the Amazon S3 and Route 53 route and pay $.50 to $1.50 a month. It's dirt cheap for solid, reliable static hosting.