DEV Community

Cover image for Serverless Framework vs SAM vs AWS CDK

Serverless Framework vs SAM vs AWS CDK

Sebastian Bille on May 07, 2021

ℹ️ Edit: An updated version, with more options included, exists here ⚡️Serverless Fr...
Collapse
 
xeoneux profile image
Aayush Kapoor

Thanks @tastefulelk
I was looking a practical difference between these three to start my first serverless project and stumbled upon this article which very well written. It clearly explains the difference.

Collapse
 
tastefulelk profile image
Sebastian Bille

Thank you Aayush, I'm glad it helped!

Collapse
 
loujaybee profile image
Lou (🚀 Open Up The Cloud ☁️)

Yo Sebastian, nice write up!

When I was getting into this whole area, understanding the differences between the frameworks was a challenge (I did a write up back then, too), and they're not entirely direct competitors which makes it a bit tricky. I never got into Serverless Framework... as you say jumping between custom configurations and CloudFormation feels weird and clunky. I've enjoyed using SAM recently, but also for the out-of-the-box local dev set up. I've still not yet jumped into CDK so far, but I keep hearing great things, so maybe it's time to stop pushing it down my priorities list!

Collapse
 
tastefulelk profile image
Sebastian Bille

Thank you Lou! 🙌

You should! If nothing else, it broadens the horizon and I enjoyed playing around and learning it since it's a quite different approach to the challenges!

Collapse
 
raaghu profile image
Raghavendra

I would like to Introduce one more framework to this list
somod.dev

Features:

  • Reusability at the core
  • Modular
  • Typescript Support
  • Optionally have UI (In ReactJS)
  • On Top of AWS SAM

CONS:

  • Supports AWS alone,
  • Works with NodeJs runtime only
Collapse
 
sujithvn profile image
Sujith

How could we compare the above options with
serverless-stack.com/

Collapse
 
tastefulelk profile image
Sebastian Bille

Great question, I'm actually working on an updated version of this post where I include SST! I'll let you know here when I post it!

Collapse
 
sujithvn profile image
Sujith

Thanks a ton and looking forward to the updated one!!

Meanwhile, couple of suggestions -

  • You may even consider github.com/pulumi/pulumi into the comparison and they already have 11K Stars
  • You may also include into your comparison that couple of them have a Pricing plan attached (Serverless & Pulumi) while others don't.

Good luck!

Collapse
 
mnapoli profile image
Matthieu Napoli

FYI we are working on Lift (github.com/getlift/lift) at Serverless, it seems that in this specific example this could help :)

In any case that was a fair comparison, nice article!

Collapse
 
tastefulelk profile image
Sebastian Bille

That's true, it probably would've! Lift is pretty much a counter to the point that you often have to resort to CloudFormation as soon as you want anything more than a Lambda function 👍

Collapse
 
semsphy profile image
Sophy Sem

Thank you for such a great article :)

Sometimes, I use the cdk and serverless in a single project.

Collapse
 
tastefulelk profile image
Sebastian Bille

Thank you Sophy! 🙌

Collapse
 
valaug profile image
Augusto Valdivia • Edited

Thank you for sharing difference between these tools. It was very helpful to understand the cons and pro.

Well written.

Collapse
 
tastefulelk profile image
Sebastian Bille

Thanks a lot for the feedback Augusto! ❤️