this post was submitted on 06 Jul 2023
0 points (50.0% liked)

Amazon Web Services

268 readers
1 users here now

founded 1 year ago
MODERATORS
 

Copied directly from the link:

Servers or Serverless - Which is better from a cost perspective?

It really depends upon the use case!

From a financial perspective, it’s a rent vs buy decision.

If a system is used sporadically, then serverless is often cheaper.

If a system is used constantly – serverless can be 10 X more expensive!

You can think of it in the same manner as buying a car vs taking an Uber.

For example – if you live in a city and take ten $25 dollar Uber trips per month the cost is $250

The cost of buying a car, fuel, plus insurance and parking could be $1000 - $2000 per month in most cities.

In the above case – it’s cheaper for this individual to use Uber.

But what happens when a person needs six - $20 Uber trips per day? Now that’s $120 dollars per day or $3600 per month.

In this case, it’s far cheaper to buy a car than to take an Uber.

As a bonus to this second scenario, in the end the person still has the car and can continue to drive the car or sell the asset when the payments are finished.

This is essentially the same calculation of server vs serverless on the cloud.

So, which is better from a cost perspective server or serverless?

It depends upon how the systems are used.

If the systems are used infrequently then serverless is often cheaper. If the systems are used consistently then serverless is much more expensive.

Now you have a fundamental understanding of servers and serverless and their costs.

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 2 points 11 months ago (1 children)

One benefit of serverless is around security use-cases. Often core functionality like validating and signing certificates or identity/access tokens is quick and not so frequently called, but is vital to the wider systems.

With Lambda, you can put this security sensitive code & config in a separate AWS Account with highly restricted access, and pay $1-10/month for peace of mind.

Developers can continue to work in the main accounts and leverage the security APIs as needed.

[–] butternuts 2 points 11 months ago

For me I really like serverless when I'm trying to build a proof of concept or demo for my personal projects. A lot of the services are on the free tier so I've built many APIs with user auth, websockets, and ton of other features for nothing in price.