Live data from Hacker News

AWS costs every programmer should know (2019)

david-codes.hatanian.com

31–40 of 163 posts

Re: AWS costs every programmer should know (2019)

#31
post #4

It's interesting how AWS can keep so high prices on these. But it's just the beginning, the real money comes from when they convince you to run over a dozen vms/containers (all needing storage etc of course). You need to be triply redundant on 3 availability zones, (3x) both with the RDS db cluster and app containers (2x) . And then have separate dev/staging/prod envs (3x). That's 18x. You can then get a pat on the h…

Cloud Architecture: tech's version of a record label contract

Re: AWS costs every programmer should know (2019)

#32
post #29

Earlier quoted context omitted.

Currently have a deployment in Oregon and cloudfront servicing most of the world. With localisation. No need to deploy in Japan to support Japan. The only tricky one is China because of the firewall. Tho that hasn’t been an issue for the last few years as they haven’t been blocking cloudfront completely. (This has been running for 10 years in AWS without issue)

> Currently have a deployment in Oregon and cloudfront servicing most of the world. With localisation. So you're serving static assets through CloudFront with a single backing service. Congrats, you managed to have a service that doesn't offer regional services. Also, you definitely don't support clients in China, or enjoy shooting yourself in the foot. Most professional applications with a global deployment and payi…

So 10+ years of supporting broadcasters and creative agencies around the world from 1 region is not supporting those countries. Got it. I mean there’s services in those regions for the tasks performed but even then it doesn’t require the level of testing you’re assuming it does.

Re: AWS costs every programmer should know (2019)

#33
post #4

It's interesting how AWS can keep so high prices on these. But it's just the beginning, the real money comes from when they convince you to run over a dozen vms/containers (all needing storage etc of course). You need to be triply redundant on 3 availability zones, (3x) both with the RDS db cluster and app containers (2x) . And then have separate dev/staging/prod envs (3x). That's 18x. You can then get a pat on the h…

This seems overwhelmingly pessimistic. VMs, serverless, and Kubernetes all panned without a suggestion of an alternative. The theme is knocking on AWS, so is your suggestion to go back to colos and self-hosting? Does that really sound better than infra-as-code?

Re: AWS costs every programmer should know (2019)

#34
post #4

It's interesting how AWS can keep so high prices on these. But it's just the beginning, the real money comes from when they convince you to run over a dozen vms/containers (all needing storage etc of course). You need to be triply redundant on 3 availability zones, (3x) both with the RDS db cluster and app containers (2x) . And then have separate dev/staging/prod envs (3x). That's 18x. You can then get a pat on the h…

> And don't even get me started on how much work by this time has gone to build the infra-as-code to manage the rube golderg machine, you'll (seriously) have more lines of CDK code than app logic (that was slower to develop & harder to debug than your actual app code per line).

Of all the AWS complaints, CDK is one of yours? I absolutely love CDK and its take on infra-as-code where you construct OO constructs imperatively in a sane language (please, please no more YAML-based DSLs...). I've found that CDK is the only one to have given us the code reusability that all of these solutions always promise while still being overtly hackable.

Debugging CDK code? What kind of wacky stuff are you trying to do? I don't think I've ever had to debug CDK outside of typical "what IAM action am I missing?" or "how do I click some checkbox in CDK?".

I'm curious what you would consider to be better alternatives to CDK.

Re: AWS costs every programmer should know (2019)

#35
post #28

aws can be so cheap. aside from egress bandwidth, it’s pricing is fantastic. crazy aws cost is always gonna be a case of your holding it wrong. either intentionally because it’s more fun, or accidentally. how to use aws well and cheaply: - scale to zero whenever possible (lambda) - use minimal infrastructure (lambda managing ec2 with route53 health check) - don’t use rds (s3+dynamo ideally, sql on i4i nvme if you mus…

> scale to zero whenever possible (lambda) AWS pricing is great because you aren't price-gouged if you don't use it? And your statement isn't really true. If you use AWS Lambdas do implement something like an HTTP endpoint, you still need to pay for stuff like AWS KMS and API Gateway even if no client hits you with a request. - use minimal infra (lambda managing ec2 with route53 health check) Above free tier AWS Lamb…

aws pricing is literally a catalog. what and how much you buy is kind of the whole thing. a subset of the catalog is good.

aws core primitives are:

- flexible

- reliable

- robust

if your service succeeds, you will definitely want to move some components out of aws, but not all of it. aws can always remain the control plane.

if you don’t need what aws offers, don’t use it. they offer it at a price, and it is what it is. thanks to other providers, it likely will remain fair over time.

what i outlined was how to make aws cheap(er). it’s a simple strategy:

- use the primitives: s3, ec2, nvme, route53, lambda, apigateway

- avoid the services: rds and all the rest

- avoid heavy egress: use cloudflare workers and r2

scaling to zero means avoiding things like kms keys.

not sure where you got apigateway pricing from, it definitely scales to zero without fixed minimum cost.

lambda will always be the most reliable part of your stack. when you have enough traffic that it’s worth it, use ec2 instead and let lambda manage those machines.

Re: AWS costs every programmer should know (2019)

#36

The one AWS service that I pay for is S3 Glacier Deep Archive. It is very cheap insurance for knowing with virtual certainty that your data exists. Egress is expensive ($100/TB last I checked), but in the target use - backups of last resort - I will be very glad to pay that to have my data back. And if all goes right I'll never pay it. Personally I find ordinary S3 far too expensive to justify. Not so with Deep Archi…

Out of curiosity, what do you think a fair price for s3 would be? I haven't had a problem with the storage prices, just egress fees can add up (I don't work for aws or a cloud provider, just curious)

r2 is in public beta! it’s great.

Re: AWS costs every programmer should know (2019)

#37
post #4

It's interesting how AWS can keep so high prices on these. But it's just the beginning, the real money comes from when they convince you to run over a dozen vms/containers (all needing storage etc of course). You need to be triply redundant on 3 availability zones, (3x) both with the RDS db cluster and app containers (2x) . And then have separate dev/staging/prod envs (3x). That's 18x. You can then get a pat on the h…

> You need to be triply redundant on 3 availability zones, (3x) both with the RDS db cluster and app containers (2x) . And then have separate dev/staging/prod envs (3x). That's 18x. Why would you care about the redundancy on staging / dev? Just making up things to inflate AWS costs now.

Even if you don't want it sometimes you're forced to run multiple AZs (eg: EKS requires 2x). But that 18x figure is nuts. VPCs, AZs, subnets, IAM etc are free. The cost comes from what you deploy into them. So separate environments don't have to be as expensive as production. You can scale them to zero, use smaller computer instances, run self-managed versions of expensive stuff (like DBs) or simply run small single-instances of RDS instead of large redundant clusters. Non-prod environments they're a great place to experiment with aggressive scale-down on cost while observing performance.

Re: AWS costs every programmer should know (2019)

#38
post #4

It's interesting how AWS can keep so high prices on these. But it's just the beginning, the real money comes from when they convince you to run over a dozen vms/containers (all needing storage etc of course). You need to be triply redundant on 3 availability zones, (3x) both with the RDS db cluster and app containers (2x) . And then have separate dev/staging/prod envs (3x). That's 18x. You can then get a pat on the h…

> And don't even get me started on how much work by this time has gone to build the infra-as-code to manage the rube golderg machine, you'll (seriously) have more lines of CDK code than app logic (that was slower to develop & harder to debug than your actual app code per line). Of all the AWS complaints, CDK is one of yours? I absolutely love CDK and its take on infra-as-code where you construct OO constructs imperat…

CDK code also isn't executed at runtime. Even if it somehow is slower to develop and harder to debug (maybe if you're new to it), it's ideal that you have more of it than actual app code per line. That implies you have substantially less app code than you otherwise would, which (of course) is the entire purpose of these cloud-based abstractions.

The amount of app code involved to stitch Kinesis, Lambda, and S3 together is minimal. The amount of app code to solve the same problems without them is orders of magnitude more plentiful and complex, which is why we avoid it.

Re: AWS costs every programmer should know (2019)

#40
This is a tiny bit out of date, but the costs have not changed much from what I can see. Also, for a point of comparison:

                        Azure      AWS
    CPU core / month    $40.32   $34.56
    GB ram / month      $10.00    $8.64
    GB logs              $2.30    $0.53
So it seems that for the "latest gen" VMs currently available, Azure does charge a little bit of a price premium over AWS, but it's not a massive difference. Also, costs have gone up but it's roughly in line with inflation. Also note that 2022 era CPUs are somewhat faster than 2019 era CPUs, so you get more for your money.

The biggest difference between the two biggest cloud providers I've noticed is Azure Log Analytics versus AWS CloudWatch logs.

Azure's logs are nearly 5x as expensive as AWS to ingest, and AWS is already overpriced in my opinion. Charging $542 to keep 1TB of logs for a month is insane, because they're stored in a compressed columnar format and aren't actually that big on disk. Azure's $2,350 for a TB of logs is highway robbery and makes it impossibly expensive to use many of their dependent services in the way they are supposed to be used. For example, ingesting all web logs can cost more than the web server being monitored! Similarly, their SIEM security product Sentinel is stupidly expensive if you enable all of the data feeds it supports. Think 5 or 6 figure sums per month.

PS: Another thing that catches people out when designing cloud solutions is disks are typically "fully allocated". If you pre-provision an empty 1 TB disk, you're charged for the full terabyte, not your current usage of it. This is not what VMware vSphere does (typically), so many people simply ask for 1, 2, or even 4 TB disks, put 20 megabytes of application code into them, and then they're unaware that they're overpaying for storage by a factor of 50,000x or more.

Post reply on HN