AWS CDK vs Serverless Framework for lambda?

Read more about AWS CDK here:

It has some obvious advantages over the serverless framework, most notably that you can write your stack in code. E.g. you can programmatically define that a certain stack should be deployed prior to another one, and you can easily pass references from one to another, which is much easier than relying on hardcoded cross-stack references and then remember whether that updated version of a referenced stack is already deployed or not.

Does anyone have experience with AWS CDK? Do you think it can replace this framework, or if this framework can rely on it or learn from it?


I have posted feature request to integrate with AWS CDK:

Yes, just started using it and its a breath of fresh air! If you do anything other than Lambda functions on AWS its so much easier as you just define what you want and it creates all the IAM roles with minimal access permissions. And yes, you can script it so if you have a generic lambda that you call differently, i.e. different environmental vars say, you can loop over an array which contains the differences. You don’t have to write any cloudformation template stuff anymore or dick around with references, its all setup for you, you just have to link the services.
The only draw back is that there is vendor lock in, but it i expect a framework to emerge that abstracts the provider out and does this generically… i mean they pretty much all offer the same stuff.