DEV Community


Discussion on: Serverless on AWS Lambda: A Comprehensive Comparison Of Approaches (Serverless Framework vs SAM vs Terraform vs CloudFormation)

loujaybee profile image
Lou — Cloud Engineer Author

Glad to hear you thought it was fair! I was trying my hardest to bite my lip to keep it unbiased! In some parts I'm more replaying some thoughts that I've heard from around the community rather than my own opinion.

My personal preference is the same, to just use Terraform (I'm very sure I'm in the minority here). That's probably because I'm comfortable with Terraform and happy to provision my own resources, I'd rather be reading the AWS docs than serverless framework docs, personally.

I see serverless framework very similar to Heroku. Great if you have a low level of infrastructure chops, but then you might start to feel restricted. From a personal perspective I found that after using Serverless framework I got immediately frustrated when I couldn't just look at the AWS resource and directly change my resources. I guess if you're a total beginner this would be frustrating / daunting so it's totally cool if you're new to the tech.

And then of course come the "but what about local dev?", etc, arguments... But I've found that if the app is well setup you can just use a container (or similar) to run it locally (and actually IMO this is an anti-pattern). Well mocked tests go a hell of a long way (and serverless framework isn't going to do the hard work of setting you up a well tested app with well written mocks).

Come to think of it, there's clearly a whole different article in there about: "Here's the frameworks and things you can do... but here's what I actually do" 😂

rolfstreefkerk profile image
Rolf Streefkerk

Local development is a whole other discussion, but as you said I also consider it to be an anti-pattern for the simple reason environments are never the same. I never bother running local tests for that simple reason to avoid issues that are very hard to debug