I recently worked on a small project using the Serverless Framework. As someone more experienced with terraform, I found it to be a new, interesting experience. It’s worth noting that Serverless uses CloudFormation underneath for AWS. After few weeks, I can share a bit of my personal thoughts about the framework.
Firstly, the Serverless Framework is not a bad piece of software. It can deploy an API Gateway with a bunch of lambda functions in a moment. However, it does have some limitations that can be deal breakers or at least annoying.
The fun begins when you have more dependencies. Unfortunately there is not a lot of a documentation available. Most of the times, I had to search for code samples around the internet. And the documentation says…
All the Serverless Framework documentation applies to AWS by default. This is why there is no sub-documentation specific to AWS: everything related to AWS is already covered by the documentation.
well, not exactly accurate. It’s somewhat related to AWS, but in my opinion it does not show how to do AWS-specific things very well.
The biggest downside, and one that’s not unique to Serverless, is the limitation of CloudFormation, which only support
single-region deployments. Even if you think it’s not your case,there may be resources were you need to use a
region in AWS. And you’ll quickly find that
global for CloudFormation means
Additionally, referencing variables and parameters between resources sometimes can be tricky, and some errors are not obvious and can mean errors in different part of code.
Would I use Serverless Framework again? If it were up to me - probably not. I often prefer simpler tools that may lack some functionality at first, but in the end help to keep code cleaner. In my opinion, the flexibility for Cloud automation in Serverless Framework is too limited, and there aren’t enough examples available. However, if you only need to deploy an API Gateway and use other tools for the rest, or if you’re sure that your solution will be straightforward, then it could be a good fit.