Can CDK replace the need for serverless framework?

Thank you for maintaining this guide. It’s simple, clear and I used it as a basis for an entire serverless full stack product.

CDK looks like a real upgrade. I was wondering if CDK allows creation of cloud resources, isn’t it possible to use it for api deployment as well?
What does the serverless framework do that CDK cannot, and why do we now need both?


1 Like


CDK technically can and many people do use it this way. However, the local development experience of creating Lambda functions and API endpoints in Serverless Framework is much better. There’s also a huge ecosystem of plugins that handle specific use cases for Lambdas/APIs.

Put another way, Serverless Framework takes a subset (Lambdas/APIs) and does a better job for them.

However, the moment you step outside that, you need to write standard CloudFormation YAML, and this is where CDK shines.