Use CDK or CloudFormation -> what justifications? Currently, the CDK is still used, whether with Java or another language?

0

Use CDK or CloudFormation -> what justifications? Currently, the CDK is still used, whether with Java or another language?

I quote: "IT teams have two AWS-native options for infrastructure-as-code: AWS CloudFormation and AWS Cloud Development Kit (CDK). CloudFormation templates were AWS's first foray into cloud-based infrastructure-as-code, and while are useful, CloudFormation has clear weaknesses, more specifically, it lacks built-in logic features and has a steep learning curve.

The AWS CDK, an open source software development framework for defining cloud infrastructure, addresses these weaknesses. The AWS CDK supports popular programming languages that developers can use to build, automate, and manage infrastructure based on an imperative approach. Finally, developers can provision these commands through CloudFormation."

2 Answers
0
profile pictureAWS
EXPERT
answered a year ago
0

Same as Indranil here, also that had my answer that you seem to have commented.

I am just going to add to it responding to your comment in your question: CFN might feel like there is a steep learning curve if you never used it. I have been using it since it was only JSON, which made it both great and painful (specifically, "where is that missing, ?" sort of issue). But, it's really not, just like everything, it takes time and effort to get to know a language/service very well. Is it perfect? "God no", but I have old templates that still work today that I haven't had to change in years. CDK in these years already did change version, however.

Now CDK being something you can code with makes the adoption more dev friendly but also I have seen many examples where CDK users end up creating single-use templates, simply because they hardcode values which should be parameters. Maybe someone else using CDK too might be able to run the script again and get new templates out of it, but then that's only valid for them now.

Also one of my favorite things with CFN native templates is that you can host them in S3 publicly, and create links for people to "just deploy". Very useful to share and reuse. Also, for an IT department, that makes it easy to create items in Service Catalog.

Again, as said in my previous post, CDK or native CFN templates is up to the person writing these. But either way, they should always think about reusability first, expandability, and then go bespoke.

profile picture
answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions