Pros and Cons of building "serverlessly"

I'm bullish on serverless. I know the name is annoying because yes, there are still servers, but from the serverless user's perspective, it doesn't really matter!

I built Coalesce on serverless tech and wanted to list some of the nice and not-so-nice things I've experienced with the services that I've used so far.

First, a quick list of the services I'm using for the Coalesce app (everything's on AWS):

  • Cloudfront + S3 for frontend hosting
  • Cognito User Pools for authentication
  • DynamoDB as the main database
  • API Gateway Websockets + Lambda for the backend connectivity and logic

Also, the marketing site is on Netlify.

Pros

  • Lack of server maintenance (this is the big one).
    • I basically don't have to worry about uptime. Even if something does go down, there's nothing for me to do except wait for Amazon to get it back up.
  • Performant and scalable out of the box.
    • Lambda cold starts aren't an issue any more (in most common scenarios, including mine).
    • Cloudfront + S3 is cheap and fast hosting that can serve globally (though I only have US & Canada turned on right now for Cloudfront).
    • DynamoDB is fast at scale as long as you architect the keys and indexes well.
    • API Gateway Websockets are the least battle tested on the list, but so far, they seem to provide all the benefits of websockets without the pain of dealing with them manually.
  • Insanely cheap at small scale.
    • Coalesce will run basically for free until I start getting more users.

Cons

  • Awkward development.
    • I settled on keeping a dev deployment running at all times that I develop against. I'll probably try to get everything running locally again at some point, but it was too painful last time I tried (specifically, Cognito and API Gateway Websockets make it hard for my app).
    • This can also make problems hard to debug. Generous logging helps.
  • Complicated architecture.
    • There are just more pieces than your average rails app that all have to work together nicely, and it gets complex quickly. Using infrastructure as code tooling helps a lot. I'm using serverless.
  • Documentation can be hit or miss
    • Netlify has great docs and Amazon has pretty good docs. My biggest pain point has been figuring out how to accomplish things in cloudformation since it seems that the cloudformation support is always a cycle or two behind service features.
  • Might get expensive at scale
    • These services will probably cost more than a traditional app would at some scale, but I haven't reached that crossover point yet.
    • I won't have to worry about this for a long time probably.

What other Pros & Cons did I forget? Do you think the tradeoffs are worth it? I've only used AWS really; how do GCP/azure compare and what other services should I be looking at?

(This post first appeared on IndieHackers: https://www.indiehackers.com/post/pros-and-cons-of-building-serverlessly-7817d4c38f)