News for hackers. Stuff that matters.
Re:AWS Makes Cloud Formation Stack Creation Up to 40% Faster by guidedlight on Monday March 18, 2024 @03:48AM (#39741323)
Is anyone still using Cloudformation?
Re:AWS Makes Cloud Formation Stack Creation Up to 40% Faster by lifesaverluke on Monday March 18, 2024 @03:56AM (#39741362)
Yes. But only with the CDK.
Re:AWS Makes Cloud Formation Stack Creation Up to 40% Faster by irjustin on Monday March 18, 2024 @04:15AM (#39741457)
Same. The CF templates are a nightmare at any reasonable size.
Re:AWS Makes Cloud Formation Stack Creation Up to 40% Faster by lxrbst on Monday March 18, 2024 @04:04AM (#39741402)
Indirectly and/or under the hood. What alternatives are there? Terraform?
Re:AWS Makes Cloud Formation Stack Creation Up to 40% Faster by ody4242 on Monday March 18, 2024 @05:05AM (#39741719)
Terraform

Crossplane (although it's quite new, and missing a lot of things that Terraform has)

Re:AWS Makes Cloud Formation Stack Creation Up to 40% Faster by camhart on Monday March 18, 2024 @03:57AM (#39741366)
Used by serverless framework.
Re:AWS Makes Cloud Formation Stack Creation Up to 40% Faster by merek on Monday March 18, 2024 @03:55AM (#39741359)
It's used under the hood by AWS CDK and AWS SAM, both of which are popular
Re:AWS Makes Cloud Formation Stack Creation Up to 40% Faster by winkelwagen on Monday March 18, 2024 @04:00AM (#39741381)
What would you use instead?
Re:AWS Makes Cloud Formation Stack Creation Up to 40% Faster by aden1ne on Monday March 18, 2024 @04:08AM (#39741421)
not OP, but I use terraform instead.
Re:AWS Makes Cloud Formation Stack Creation Up to 40% Faster by simmerup on Monday March 18, 2024 @04:20AM (#39741479)
I find terraform doesn’t do the tear down as well
Re:AWS Makes Cloud Formation Stack Creation Up to 40% Faster by vegardx on Monday March 18, 2024 @04:49AM (#39741625)
In what way?

I've always found that Terraform does it exceptionally well, mostly because of the dependency graph and how good providers map resources so that they don't end up in a dead lock.

Re:AWS Makes Cloud Formation Stack Creation Up to 40% Faster by AlecBG on Monday March 18, 2024 @04:55AM (#39741657)
I've found the exact opposite of that in practice. Had way more problems with tearing down CDK stacks
Re:AWS Makes Cloud Formation Stack Creation Up to 40% Faster by re-thc on Monday March 18, 2024 @04:43AM (#39741589)
Terraform is too low level. If only there were L2 / L3 constructs like CDK. There are modules, but often only community / 3rd party.
Re:AWS Makes Cloud Formation Stack Creation Up to 40% Faster by OJFord on Monday March 18, 2024 @05:05AM (#39741722)
> There are modules, but often only community / 3rd party.

What, it's Terraform's fault that you haven't bothered to write one yourself?

Re:AWS Makes Cloud Formation Stack Creation Up to 40% Faster by re-thc on Monday March 18, 2024 @06:30AM (#39742200)
> What, it's Terraform's fault that you haven't bothered to write one yourself?

Let's just all code in assembly then? Because we all should bother to write anything and everything from scratch?

Re:AWS Makes Cloud Formation Stack Creation Up to 40% Faster by OJFord on Monday March 18, 2024 @06:35AM (#39742236)
No? The complaint was that they had to use a third party or community one, as though those people are doing by some kind of magic unavailable to them; they for some reason don't want to use those (maybe they're not suitable for particular use case, I don't know) and it's somehow terraform's fault that they haven't then written their own. It is possible, so I just don't understand what the complaint is.
Re:AWS Makes Cloud Formation Stack Creation Up to 40% Faster by re-thc on Monday March 18, 2024 @06:50AM (#39742337)
> It is possible, so I just don't understand what the complaint is.

And it is also possible to write in assembly, will you?

> The complaint was that they had to use a third party or community one

And isn't that fair? People want support? Official support? Is that wrong? And yes community modules especially since they might not be from the same group lack consistency, documentation and often doesn't get updated as regularly. The magic is the vendor is the only 1 that can properly coordinate updates.

> as though those people are doing by some kind of magic unavailable to them

Then why are you using Terraform? The APIs behind Terraform are also available to you so you can use that directly. There's no magic unavailable to you either. And you go beyond not using those APIs and build your own servers and data centers too.

I don't get why Terraform is a fair abstraction you're defending yet you're arguing against people wanting a higher level of abstraction.

Re:AWS Makes Cloud Formation Stack Creation Up to 40% Faster by OJFord on Monday March 18, 2024 @07:04AM (#39742443)
I'm not arguing against higher abstraction, I'm not saying write assembly.

Modules are the same abstraction as L2/L3 constructs. In either case if you don't want to use someone else's (and you want one) you write your own. If you then haven't, it's not Terraform's or AWS CDK's fault.

Re:AWS Makes Cloud Formation Stack Creation Up to 40% Faster by zoover2020 on Monday March 18, 2024 @05:51AM (#39741981)
Yes. No L2/L3 constructs is a hard no from an IaC buy-in perspective
Re:AWS Makes Cloud Formation Stack Creation Up to 40% Faster by OJFord on Monday March 18, 2024 @06:31AM (#39742205)
Well terraform is never going to have 'L2/L3 constructs' because that is just AWS terminology. https://docs.aws.amazon.com/prescriptive-guidance/latest/aws...

What it does have is modules, which accomplish the same. And of course, if you don't want to write them then just as with L2/L3 constructs you are limited to using others'.

Re:AWS Makes Cloud Formation Stack Creation Up to 40% Faster by zmgsabst on Monday March 18, 2024 @04:57AM (#39741676)
Re:AWS Makes Cloud Formation Stack Creation Up to 40% Faster by re-thc on Monday March 18, 2024 @06:29AM (#39742191)
Sure, but we're talking about now. Lots of things have been "on the way".
Re:AWS Makes Cloud Formation Stack Creation Up to 40% Faster by simmerup on Monday March 18, 2024 @03:55AM (#39741358)
i use it on my team. Makes it easy for every dev to set up their own environment
Re:AWS Makes Cloud Formation Stack Creation Up to 40% Faster by trulyhnh on Monday March 18, 2024 @03:55AM (#39741356)
Yes. Curios what do you use?
Re:AWS Makes Cloud Formation Stack Creation Up to 40% Faster by throwaway2990 on Monday March 18, 2024 @03:53AM (#39741347)
Yes. It’s good.
Re:AWS Makes Cloud Formation Stack Creation Up to 40% Faster by jdub on Monday March 18, 2024 @04:34AM (#39741548)
Yes. Directly – no CDK or wrappers – using the serverless transform when it makes sense.

I know how CloudFormation behaves, and none of the wrappers have convinced me that translating through CloudFormation makes sense. ("through" because if you're using CDK, you're translating from imperative to declarative to imperative... why?!)

Re:AWS Makes Cloud Formation Stack Creation Up to 40% Faster by slau on Monday March 18, 2024 @04:55AM (#39741660)
I write CloudFormation for a living. I had been quick to disregard CDK, and sort of ignored it for a while.

I tried it on a recent greenfield project, and now I’m kicking myself for not giving it a try in earnest earlier.

Re:AWS Makes Cloud Formation Stack Creation Up to 40% Faster by moritonal on Monday March 18, 2024 @05:05AM (#39741724)
It's in my opinion one of the more interesting tech in the IaC space. Even the way it works internally with the JS interpreter is kind of smart.
Re:AWS Makes Cloud Formation Stack Creation Up to 40% Faster by lf-non on Monday March 18, 2024 @05:38AM (#39741913)
Yes, purely from a user pov, the way fake stack traces are reported to point out the failing construct is quite nice.
Re:AWS Makes Cloud Formation Stack Creation Up to 40% Faster by loevborg on Monday March 18, 2024 @05:39AM (#39741919)
What do you mean by "JS interpreter"? Can you elaborate?
Re:AWS Makes Cloud Formation Stack Creation Up to 40% Faster by anentropic on Monday March 18, 2024 @06:21AM (#39742139)
The libraries for other supported languages of CDK are built as wrappers for underlying JS or maybe TS code via https://github.com/aws/jsii

So all the core CDK code is written first in JS/TS and then stubs for the other languages are added

Unfortunately this is often done without consideration for how the other supported langs actually work, and artefacts of e.g. JS lack of support for kwargs leak through

This is why e.g. the typing in CDK Python is completely broken - pretty much uniformly the concrete types like "Resource" don't implement their corresponding interface like "IResource" (to a type checker)

(There are many other typing niggles like this but that's the most egregious and pervasive one)

At the end of the day, having to explicitly cast concrete types as their interface to satisfy type checker is a minor annoyance, albeit a stupid one that could have been avoided with more care in the core library.

I could live with that, but I encountered so many bugs and issues trying to use CDK on current project that it's now much clearer to me why every company I worked at previously was using Terraform.

Pretty sure some of those issues are ultimately CloudFormation ones. The cumbersome CF > CDK JS > CDK Python stack is great for obfuscating errors and making debugging hard or impossible though.

Pulumi do something similar, albeit with Go as the core language and Terraform underneath. From what I've seen with a little use they have a much more successful result though, Pulumi Python was not a complete mess, and deploys faster and more reliable with better error feedback. I guess they just took more care to get it right.

Re:AWS Makes Cloud Formation Stack Creation Up to 40% Faster by Aeolun on Monday March 18, 2024 @06:06AM (#39742055)
Try Pulumi and have the same experience (but now vs CDK) all over again?
Re:AWS Makes Cloud Formation Stack Creation Up to 40% Faster by slau on Monday March 18, 2024 @08:49AM (#39743629)
Pulumi is not on some of my clients’ approved software list, so no can do.
Re:AWS Makes Cloud Formation Stack Creation Up to 40% Faster by lf-non on Monday March 18, 2024 @05:36AM (#39741896)
Plain CF sucks because it doesn't really provide any kind of abstraction capability. So in any kind of real world application the yaml gets humongous that is very hard to review.

I would have been perfectly happy to use CF if they added the notion of higher level constructs at CF level, but for whatever reason they haven't. So I use CDK because it provides the ability to reuse service compositions from third party libraries as well as across different internal projects.

CDK is imperative but imperatively building the configuration is not at all the same as imperatively managing the infrastructure. Even if with CDK the configuration is imperatively built you retain all the benefits of having declarative infra - version control, selective auto update, rollback to previous state etc.

Yes, while CF is clunky and slow, and I am sure everyone who uses it has at times gotten stuck with rollback failures, but CDK does provide a somewhat better dx on top of it.

Re:AWS Makes Cloud Formation Stack Creation Up to 40% Faster by dmw_ng on Monday March 18, 2024 @05:39AM (#39741915)
There are tons of resource types only available via cfn compared to cloud control api vs terraform vs direct api, any decently complex deployment often requires mixing one or more options just to get full coverage
Re:AWS Makes Cloud Formation Stack Creation Up to 40% Faster by zokier on Monday March 18, 2024 @07:52AM (#39742845)
Besides SAM junk what else is not available through APIs?
Re:AWS Makes Cloud Formation Stack Creation Up to 40% Faster by benterix on Monday March 18, 2024 @06:14AM (#39742098)
> There are tons of resource types only available via cfn compared to ... terraform

And the other way round

Re:AWS Makes Cloud Formation Stack Creation Up to 40% Faster by running101 on Monday March 18, 2024 @10:54AM (#39745421)
Yes, I have engineers who refuse to use anything else.