Building serverless architectures with native Terraform modules is painfully verbose. It takes 100+ lines of HCL just to wire up a single Lambda with an API Gateway endpoint. Other tools can do this in just a few lines of code, but you shouldn't have to leave Terraform just to be productive. That's where Serverless.tf comes in. (https://serverless.tf) It keeps you in Terraform land and gets that same Lambda + API Gateway setup down to about 10 lines. It's an opinionated framework, and for most serverless use cases, those opinions are exactly what you need. And where it doesn't fit, you can always drop back to native Terraform modules. Thank you to Anton Babenko ☁🇺🇦 for creating and maintaining this important project 🙏
Also curious about Yan’s take on other serverless frameworks. I still enjoy using SST and find it to be less verbose and reasonably opinionated where possible, though it does not support the entirety of every cloud service.
Yep typically my decision tree of using IAC is also: if serverless -> no TF because of verbosity I tried some serverless/tf framework when we launched the CloudWatch Book and it didn't work out pretty well, but I'm not sure anymore which one it was. I definitely need to give it a try again! But I was also surprised of how many things you still need to do manually with shell scripts in TF. For example, calculating a Lambda hash, etc. For large-scale or multi-cloud I like it. For my day-to-day fullstack web app use case I don't
This is a great option. I started moving everything away from Serverless (Inc oss-serverless) to Terraform because of the painfully slow deployment times and the way CloudFormation kept deleting and recreating my artifacts. Terraform seems a lot more stable, I haven't tried serverless.tf but will definitely take a look now.
I used it to migrate from Serverless Framework v3 to Terraform. It’s a highly recommended framework
What do you think, instead of Terraform, do it with Pulumi? :)
Yan Cui what are your thoughts on the various IaS options (CDK, Terraform, serverless, something else)? I have primarily used CDK but It seems like Terraform is very popular (if not more popular). What are you using as your daily driver?