DEV Community

Cover image for ๐Ÿฅ‡ The Best Serverless Framework in 2023: A Data-Driven Showdown for AWS Projects
Valentin BEGGI for Serverless By Theodo

Posted on

23 9 7 8 13

๐Ÿฅ‡ The Best Serverless Framework in 2023: A Data-Driven Showdown for AWS Projects

TL;DR

โšก Opt for SST for new, simpler projects, rapid delivery, owning NextJS infra, or when having limited AWS expertise.
โ˜๏ธ Go with CDK when integrating with or migrating existing infrastructures, for large enterprise projects, or when dealing with intricate infrastructures.

Why โ“

If you're wondering which serverless framework to adopt for your next AWS project in 2023, you're in the right place.

Whether you're starting from scratch or working on an intricate enterprise infrastructure, this comparison dives deep into the pros, cons, and best use cases for the top contenders.

Stick around and let's ensure your next choice is an informed one ๐Ÿง .

The contenders ๐ŸฅŠ

Here are our three contenders

1 - Serverless + AWS CDK + Lift: An integration that amps up the traditional Serverless Framework with Lift's static frontend construct and CDK's robust infra definition.

๐Ÿ’ก Have a look here to understand how the three are bridged together

2 - AWS CDK: AWS's native toolkit, offering a high-level, typesafe approach to AWS resources.

3 - SST: A TypeScript first framework streamlining serverless apps on AWS, from debugging to deployment.

Now let's dive right into our data-driven face-off between the frameworks. See how they stack up against each other across pivotal criteria. ๐ŸฅŠ

Comparison Table ๐Ÿ“ˆ

Criteria Description 1๏ธโƒฃ Serverless Framework + CDK 2๏ธโƒฃ AWS CDK 3๏ธโƒฃ SST
Stars / Downloads 45k โญ - 1.2M downloads/week โœ… 10k โญ - 1.6M downloads/week 17k โญ - 35k downloads/week
Release frequency 1 / month 7 / month โœ… 36 / month
Ease of contribution Codebase complexity and accessibility, communication with maintainers "JS codebase Complex codebase" โŒ Slow processes hard to dev locally ๐ŸŸ  Easy to chat with the team (Discord) Codebase Typescript + accessible PRs are very slow to merge
IaC Type-safety Typescript definitions for all resources "Base is YAML, but typescript support with @serverless/typescript. Serverless Framework resources are not natively typed." โœ… Fully typed โœ… Fully Typed
Lambda Definition Ease to define a lambda resource and its triggers โœ… Config file per lambda Triggers for many services + cron ๐ŸŸก Lambda configuration is verbose. No abstraction for lambda triggers, need to define them manually. โœ… Both inline and verbose lambda configuration are available. Trigger definitions for API Gateway, Eventbus, SQS
Other Resources Definition Ease of defining resources such as S3, DynamoDB, EventBridge, SQ ๐Ÿ”ด referencing serverless provisioned resources is hard CDK / serverless stacks are dissociated โœ… โœ…
Framework flexibility Extending the capabilities of the framework to fit your need โœ… possible with plugins โœ… low level framework, you can do what you like ๐ŸŸ  still a work in progress fallback to full cdk (losing other features)
Static Frontend Deployment Existing solution to deploy a static website โœ… Lift ๐ŸŸ  requires rebuild or use of less popular construct โœ… StaticSite in SST
Next.js App Deployment Existing solution to deploy NextJs server ๐ŸŸ  amplify plugin serverless-nextjs not maintained ๐ŸŸ  amplify ๐Ÿ”ด cdk-nextjs (not well maintained) โœ… NexjsSite in SST
DevX / Debugging lambdas Ease of debugging lambda executions ๐ŸŸ  โŒ โœ… live debugging
Debugging deployment Ease of debugging fails during deployment โœ… โœ… ๐ŸŸ  SST adds a layer of liability
AWS Features completeness amount of supported features ๐ŸŸ  few releases, few contributors to implement new features โœ… ๐ŸŸก small delay (~1week)
Multiple Runtime Deployment Support for deploying multiple AWS Lambda runtimes โœ… โœ… โœ…
Multi-stack Definition Ability to define multiple stacks in a single file โŒ 1 serverless.ts per stack โœ… โœ…
Nested Stacks Support Support for AWS CloudFormation nested stacks โŒ โœ… โœ…
Documentation quality of the frameworks documentation ๐ŸŸ  yaml, no ready-to-use snippets but still quite complete ๐ŸŸก ๐ŸŸก

Our recommendation ๐Ÿฅ‡

Opt for SST if one of:

  • Starting a fresh project of low to moderate complexity
  • Prioritizing rapid delivery of value
  • Implementing NextJS without Vercel
  • Limited AWS expertise and need a more guided approach

Go with CDK if one of:

  • Integrating with or migrating an existing infrastructure
  • Engaging in large corporate projects deeply integrated with the company's Information System
  • Handling intricate and detailed infrastructures.

Wrapping Up ๐ŸŒŸ

Deciding between SST and AWS CDK comes down to the unique needs of your project. As the serverless landscape evolves, so does our understanding.
Join the discussion, bring your experiences to the table, and please challenge our criterions! Let's journey together towards a more informed decision-making process in the serverless world. ๐Ÿ’ฌ๐Ÿš€

Heroku

Simplify your DevOps and maximize your time.

Since 2007, Heroku has been the go-to platform for developers as it monitors uptime, performance, and infrastructure concerns, allowing you to focus on writing code.

Learn More

Top comments (7)

Collapse
 
ashishpandey001 profile image
Ashish Pandey โ€ข

SST doesn't support multi-account and multi-region deployments currently which AWS CDK natively does. Please be thorough with your research before publicly advocating solutions that might lock people in and limit their usability. For reference, refer this issue - github.com/sst/sst/issues/1299.

Collapse
 
valentinbeggi profile image
Valentin BEGGI โ€ข

We based our analysis on a comprehensive, yet selective, list of criteria. If someone has a specific need that isnโ€™t covered by these, they should conduct their own research. ๐Ÿค“

We didnโ€™t include multi-account deployment, but your input will certainly help others make more informed choices. Thank you ๐Ÿ™!

Collapse
 
ashishpandey001 profile image
Ashish Pandey โ€ข

How do you compare 3 frameworks by excluding a core feature which the other two support? Doesn't makes sense!

Thread Thread
 
valentinbeggi profile image
Valentin BEGGI โ€ข

Your โ€˜coreโ€™ feature might not be essential for everyone. Weโ€™ve been deploying serverless apps for years without needing it.
We didnโ€™t mention the SST console, which is a โ€˜coreโ€™ feature for SST, but hey, whoโ€™s keeping track? ๐Ÿ˜‰
In the end everyone should pick the best for their use case, we just help people decide ๐Ÿ“š

Thread Thread
 
ashishpandey001 profile image
Ashish Pandey โ€ข

Well, you put in a point called "AWS Features completeness" and put in "small delay (~1 week)". Considering AWS's official tooling allows these features and SST doesn't even after 2 major versions, it's definitely nowhere close to feature complete.

Coming to SST Console, yes, it's a good feature, you should've added it and also added that it will be moved into a separate paid product.

If you do not clarify the limitations of a platform against another you're not helping anyone. Hopefully that makes sense.

Collapse
 
itzsrikanth profile image
itzsrikanth โ€ข

Hey, your comment is very valid and I respect your willingness to share your experience with all. Maybe putting it across more subtly will encourage the author as well. No one can learn everything, and readers should take everything with a pinch of salt.

Collapse
 
pengeszikra profile image
Peter Vivo โ€ข

SST give a solution for websocket communication without websocket server?

Postmark Image

Speedy emails, satisfied customers

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up