News for hackers. Stuff that matters.
Re:AWS CloudFormation Best Practices by logicslave on Wednesday March 31, 2021 @01:37PM (#26650330)
CDK is strictly superior to cfn
Re:AWS CloudFormation Best Practices by Varriount on Wednesday March 31, 2021 @02:02PM (#26650726)
Reading CDK's introduction page, it seems that, similar to CloudFormation, it uses pre-made components, just at a higher level. Those components are then translated into a CloudFormation template[0]. Is that correct?

Might it be more accurate to state that CDK is a higher level version of CloudFormation, that abstracts away unimportant details?

[0] https://aws.amazon.com/cdk/

Re:AWS CloudFormation Best Practices by zoover2020 on Wednesday March 31, 2021 @02:21PM (#26650971)
Yes, exactly. CDK is the abstraction which compiles down to CloudFormation. You can see CF here as the assembly that gets generated.
Re:AWS CloudFormation Best Practices by l0b0 on Wednesday March 31, 2021 @03:22PM (#26651822)
As someone who's used CDK for a few months and never handcoded CF, that sounds completely correct. If you're comfortable with Python, here's a simple but non-trivial architecture you can check out: https://github.com/linz/geospatial-data-lake/blob/master/app....
Re:AWS CloudFormation Best Practices by zokier on Wednesday March 31, 2021 @03:11PM (#26651671)
CDK is essentially CFN template generation tool for TypeScript
Re:AWS CloudFormation Best Practices by cbdumas on Wednesday March 31, 2021 @02:22PM (#26650982)
I couldn't agree more. Cloudformation is a nightmare in my opinion and never should have seen public release. CDK is what Cloudformation always should have been.
Re:AWS CloudFormation Best Practices by jchanimal on Wednesday March 31, 2021 @02:19PM (#26650951)
CDK is the first time I experienced the benefits of TypeScript. If nothing else it’s a great playground to learn that stack. Testing stacks in the CDK is pretty rad.
Re:AWS CloudFormation Best Practices by mikeyjk on Wednesday March 31, 2021 @02:05PM (#26650761)
What would you flag as the biggest differences between the two?
Re:AWS CloudFormation Best Practices by zoover2020 on Wednesday March 31, 2021 @02:23PM (#26651002)
CDK is managed IaC, allowing compile-time checks and also to debug your infrastructure.

CloudFormation is just JSON or YAML (treated as assembly by CDK, by spitting out a CFN template after synthesis)

Re:AWS CloudFormation Best Practices by jen20 on Wednesday March 31, 2021 @02:51PM (#26651388)
This is not correct. CDK is not "managed IaC" - the management is done by CloudFormation. CDK is a generator for the JSON or YAML of CloudFormation, which is fully responsible for the execution and management of provisioning.
Re:AWS CloudFormation Best Practices by zoover2020 on Wednesday March 31, 2021 @03:38PM (#26652070)
I stand corrected, thanks.
Re:AWS CloudFormation Best Practices by nikolay on Wednesday March 31, 2021 @01:43PM (#26650434)
Not at all. I don't think most people really grasp what CloudFormation is.
Re:AWS CloudFormation Best Practices by logicslave on Wednesday March 31, 2021 @01:48PM (#26650512)
How so? CFN is terrible to write and maintain, cdk abstracts alot of the difficulty and makes reusable components possible. I work at Amazon...
Re:AWS CloudFormation Best Practices by stevekemp on Wednesday March 31, 2021 @02:06PM (#26650773)
Doing it by hand is certainly painful, but with libraries such as Troposphere it isn't so bad ..
Re:AWS CloudFormation Best Practices by simlevesque on Wednesday March 31, 2021 @03:35PM (#26652014)
Or such as CDK...