Live data from Hacker News

Tell HN: I DDoSed myself using CloudFront and Lambda Edge and got a $4.5k bill

news.ycombinator.com

311–320 of 348 posts

Re: Tell HN: I DDoSed myself using CloudFront and Lambda Edge and got a $4.5k bill

#311

Earlier quoted context omitted.

> your cost for doing a couple million, 2-second-long requests is about four cents. This seems wrong to me ? Can you explain a bit more ? Are these just API requests or ?

It's admittedly a simplification and a best case. For AWS Lambda, the price is in GB-seconds, and the amount of CPU available to your function is itself a function of the memory allocated. The price is $0.0000166667 for every GB-second on X86. So it looks like I've also misplaced a decimal. It's $0.20 per 1M requests with 1GB of memory. Lambdas can be sized from 128MB to 10GB, and pricing depends on the resources all…

It's not $0.20 per 1M 1 second request with 1G memory. It's $16.87, and $33.53 for the 2 seconds you mentioned in your parent post.

It's $0.20 per request, without memory.

Re: Tell HN: I DDoSed myself using CloudFront and Lambda Edge and got a $4.5k bill

#312

Earlier quoted context omitted.

It's admittedly a simplification and a best case. For AWS Lambda, the price is in GB-seconds, and the amount of CPU available to your function is itself a function of the memory allocated. The price is $0.0000166667 for every GB-second on X86. So it looks like I've also misplaced a decimal. It's $0.20 per 1M requests with 1GB of memory. Lambdas can be sized from 128MB to 10GB, and pricing depends on the resources all…

I'm not day to day on cloud stuff, haven't been in a while, that's why I'm asking this, not intended to be passive-aggressive: So if I had a "hello world" function, that basically just returned a constant JSON payload...I'm seriously looking at a pittance, pennies for millions of requests? I.e. $0.20?

No. You would also have to pay for memory usage and bandwidth.

Millions of requests for a static file is easily done on a dedicated server in a few seconds if the file is small. $0.2 per request is very expensive.

To put things in to perspective: If you buy a very cheap new server for $1K, then you would be able to handle small static requests worth thousands for dollars each day according to AWS pricing. That's a nice return on investment!

Re: Tell HN: I DDoSed myself using CloudFront and Lambda Edge and got a $4.5k bill

#313
post #112

Earlier quoted context omitted.

For 99% of projects you're never going to hit the point a single server (or group of servers if you truly need redundancy for some level of uptime) can't handle the load. For the other 1% that end up needing that scale I have a hard time accepting it's actually better to start building for massive scale day 1 instead of day 1000.

This is such a narrow perspective. It’s not always about load, most applications can benefit from some level of redundancy and using AWS etc doesn’t equal a massive scaling operation forced upon you. In fact, the other options would. I'll give you some common examples. You have a script that needs to run, without fail, at a certain time every day. You have an endpoint that is mission-critical and even a second of dow…

> You have an endpoint that needs to have as little end-user latency as physically possible.

If you need the lowest possible latency then you should definetly do it yourself. Lambda, even with provisioned concurrency has a very high latency...

Re: Tell HN: I DDoSed myself using CloudFront and Lambda Edge and got a $4.5k bill

#314

Earlier quoted context omitted.

> didn't patch its servers for years. One had a 1400 day uptime Well, this isn't exactly the best practice to follow - but, yes, this is very common, and it works (until someone finds that there's a vulnerability to exploit). So, from a purely practical perspective - software updates are certainly not a hard requirement, one can do quite well without them (just be aware about the risks). Anyway, there are many fairly…

Hardening servers isn't as hard as it used to be. Ansible does a pretty good job and there are several examples of using it to harden your server. If you are using a VPS .. you could use packer and start with a fleet of servers based on your custom image.

Oh, I don't disagree, I just meant it can be as complex as you want it to be. Hardening is just a rabbit hole that can go on almost forever - it's never really final until you declare that enough is enough, typically there's always something more one can do, if they have time and capacity.

Also, out-of-box distributions those days can be said to be already "hardened" compared to what we had 15 years ago.

Re: Tell HN: I DDoSed myself using CloudFront and Lambda Edge and got a $4.5k bill

#315
post #120

Earlier quoted context omitted.

Reading some replies here, it’s no wonder some startups go bankrupt while investing so much in infrastructure — all while not having enough users to justify more than a single dedicated server. Scalability should be the last thing in mind if your product sucks.

My frustration with replies like this one is assuming that everyone here is working on personal projects or at tiny startups trying to get users. A lot of us work at big companies with lots of users and demand and aren't just making POCs, but every time we bring up scaling or maintenance or monitoring we are told not to worry about that yet.

Fair point. If your usecase actually needs to be able to handle massive loads, then things might be different.

But then there will probably needs to be a devops team and careful planning how to architect infrastructure anyway.

Also in such cases cloud pricing becomes prohibitively expensive unless you get a special deal.

Re: Tell HN: I DDoSed myself using CloudFront and Lambda Edge and got a $4.5k bill

#316

I'm very much on the boring technology side of things with respect to hosting. 40€ / month gets you a very powerful dedicated server that can easily handle millions of requests per day and performs incredibly well and can be managed easily. If you also use containers you even get quite a bit of flexibility and agility. To be honest I don't really understand the sentiment that developers can get away with not knowing…

Another not cool kid here. I've been running my little Saas for 12 years on fixed price cloud vms, €18 total per month (initially shared hosting). I'm sure I will ever hit my providers 20TB monthly traffic limit.

I settled with running lxc containers. I just couldn't bring myself to be bothered about docker. Before I left my last job we started using k8s. I wouldn't use k8s unless in an enterprise environment. Even then I would consider the need. "But Mom, all the cool kids have k8s!"

Re: Tell HN: I DDoSed myself using CloudFront and Lambda Edge and got a $4.5k bill

#317

Earlier quoted context omitted.

Also the cost of those services vs. a few well-configured basic VPS hosts is nuts. I was shocked to learn that to get MySQL/Postgres in GCP it's often >$40/month - even for the insanely tiny instance sizes. We're talking for like 20G storage... In contrast I've ran some pretty hot-and-heavy MySQL/Postgres databases on basic DO/Linode VPS's for half of that cost with much success. I get these cloud tools give a ton of…

If you had no knowledge on standing up a DB server (installing, configuring, monitoring, logging, access control, and backups, restricting network access), how much time would that take you to learn? That and your VPS requires setup for access control, patches, updates, monitoring, logging.

The same amount of time if I would need to "stand up" a rented DB, including figuring out a bazillion of providers and options, configuring proper instance sizes, turning needed knobs for backups to work... Or you suppose what a rented service doesn't need anything at all?

Re: Tell HN: I DDoSed myself using CloudFront and Lambda Edge and got a $4.5k bill

#318

Earlier quoted context omitted.

Starting a db on a web-server and running apt update/upgrade are fundamental parts of working on the web. If you or any of your developers don't know how to do that, you/they should seriously seriously spend the 40 minutes it takes to learn.

I feel like that’s where you separate the pre-cloud and post-cloud devs. It’s not hard to imagine a dev being brought up 5 years ago into a React world, with JS in the backend and something like Vercel or Netlify to deploy their app. Someone like that might be entirely uncomfortable when dumped into a plain old Linux server, and would definitely take longer than 40 minutes to even get their head wrapped around what’s…

> and would definitely take longer than 40 minutes to even get their head wrapped around what’s going on.

If a grown up person (who is presumably making a good money in their React/JS thing) can't figure on how to install a web server in 40 minutes (with all SO, Google and a bazillion of articles on how to do so) then...

Like come on, twenty years ago you still needed to get your ass off the chair and go to the bookstore, find and buy a proper book and actually read it. Now you just need to type "Ubuntu 20 install webserver" in to the search and voila.

Re: Tell HN: I DDoSed myself using CloudFront and Lambda Edge and got a $4.5k bill

#319
post #275
post #256

Earlier quoted context omitted.

> To be honest I don't really understand the sentiment that developers can get away with not knowing basic sysadmin stuff and at the same time have to spend relevant amounts of time, energy and money to get up to speed with cloud solutions, k8s and so on. Agreed. I hear some saying it's nice to deploy on a lambda because you don't need to know anything about the runtime environment. But it's never quite true. As you…

Could not agree more. I have multiple VPS servers running for personal email, file storage, ci, and some side projects. Maintenance and management is really low - everything is backed up to S3 and if things go down, it will take an hour or so to restore it, but I can tolerate that kind of downtime as long as data is not lost. I think cloud platform is easier to sell once you need a robust HA. As for performance, one…

VISA has 2000 rps for all payment stuff. So it is what it is :)
Post reply on HN