Live data from Hacker News

Release of AWS CDKv2 and Construct Hub

aws.amazon.com

31–40 of 44 posts

Re: Release of AWS CDKv2 and Construct Hub

#31
CDK is quite great.

My only gripe I have with it: even though you can synthesize raw CloudFormation templates from a CDK project using `cdk synth`, you can't upload the artifacts without running `cdk deploy` (so you can't actually use the synthesized templates to deploy, because the artifacts aren't there).

This is in contrast to SAM which does exactly this with the `sam package` command. Generates raw CloudFormation and uploads all assets to S3 in the right place.

Re: Release of AWS CDKv2 and Construct Hub

#32

I'm pretty happy to see this. I just inherited a bunch of projects that all have entire tf stacks inside them, and I'm itching to just replace it all with some actual code. Terraform was great, once, but over time as general cloud complexity got above a handful of some ec2 machines and some networking rules, it becomes a real burden to manage. Now all our devs are struggling to manage kenesis or ecs/fargate stuff wit…

I did it, absolutely no regrets, except using CDK Pipelines.

Re: Release of AWS CDKv2 and Construct Hub

#33
post #10

I just started using CDK for a project, and after having fought with terraform and trying pulumi, I have to say CDK is a breath of fresh air. Really well thought out, makes doing things the right way easy as well. The biggest difference I can see between CDK and pulumi (other than CDK only being for AWS) is that the CDK is more opinionated. When you spawn a new database, it'll automatically create a secret in secrets…

> Not to mention, CloudFormation actually allows ~transactions, which is something you can't really get without cooperation from the cloud provider (terraform and pulumi both use cloudformation on AWS for exactly this reason) Terraform doesn't use CloudFormation on AWS (and I thought Pulumi used Terraform under the covers in some capacity?). I've also seen a lot of CloudFormation stacks get into completely unrecovera…

> maybe this has improved?

Yes, you can recover a Cloudformation stack from any status nowadays. Ex: https://aws.amazon.com/premiumsupport/knowledge-center/cloud...

Re: Release of AWS CDKv2 and Construct Hub

#34
post #10

I just started using CDK for a project, and after having fought with terraform and trying pulumi, I have to say CDK is a breath of fresh air. Really well thought out, makes doing things the right way easy as well. The biggest difference I can see between CDK and pulumi (other than CDK only being for AWS) is that the CDK is more opinionated. When you spawn a new database, it'll automatically create a secret in secrets…

just another reminder that teraform has a CDK. Everything has a CDK these days, at the end of the day the decision comes to your position on vendor lock-in/multicloud, and quality of the CDK. The fact that AWS/Pulumi have imperative CDKs is not that intersting

Re: Release of AWS CDKv2 and Construct Hub

#35

I'm pretty happy to see this. I just inherited a bunch of projects that all have entire tf stacks inside them, and I'm itching to just replace it all with some actual code. Terraform was great, once, but over time as general cloud complexity got above a handful of some ec2 machines and some networking rules, it becomes a real burden to manage. Now all our devs are struggling to manage kenesis or ecs/fargate stuff wit…

This will blow your mind: you can write a TF provider in real code that calls into the CDK that can be driven by TF scripts. You would do this to have a nice configuration language over the top of an opinionated set of resources.

Re: Release of AWS CDKv2 and Construct Hub

#36
post #5

CDK is convenient but CloudFormation is horribly slow.

There is also CDK for Terraform now actually. Hope they'll keep it up to date.

I have high hopes for this, but they've been moving at snail's pace. They're going to need close to parity with CDK for it to be adopted. That's a heavy lift.

Re: Release of AWS CDKv2 and Construct Hub

#37
post #16
post #10

I just started using CDK for a project, and after having fought with terraform and trying pulumi, I have to say CDK is a breath of fresh air. Really well thought out, makes doing things the right way easy as well. The biggest difference I can see between CDK and pulumi (other than CDK only being for AWS) is that the CDK is more opinionated. When you spawn a new database, it'll automatically create a secret in secrets…

>The biggest difference I can see between CDK and pulumi (other than CDK only being for AWS) is that the CDK is more opinionated. When you spawn a new database, it'll automatically create a secret in secretsmanager, and set up rotation etc. And since it can assume IAM, it generates granular policies for you easily with calls like `dbInstance.grantRead(lambdaInstance)` etc, instead of you having to manually construct…

I kind of like that Pulumi doesn’t do everything at a high level. Figuring out how many resources you have in AWS is hard enough even with the current implementation.

Re: Release of AWS CDKv2 and Construct Hub

#38

Earlier quoted context omitted.

I don't get the obsession with ansible and terraform as CF replacements.... When I explored both, I found no way to "translate" an AWS VM into an azure VM, you have to use completely different modules and inputs. Same for just about every module I could find... I see almost no benefit if you're working in one cloud to use a "platform agnostic" tool, if that platform agnostic tool uses platform-specific modules. We tr…

You will never find a tool that does a good job of translating between different platforms like that. The systems are too different, and the details matter too much. The value of being multi-platform is that it lets you manage resources in multiple clouds with the same tool, and coordinate the changes. For example; it would let you have application instances and databases in GCP, and manage your DNS is AWS. When you…

Another real-world example I've used that doesn't even require you to have multi-cloud: deploying an EKS cluster to AWS, deploying charts to EKS and finally creating a CNAME to the ALB in Cloudflare. You could even add Cloudflare Access, Workers etc.

Re: Release of AWS CDKv2 and Construct Hub

#39
post #17

CDK is absolutely brilliant. My eyes glaze over when I see lines and lines and pages and pages of CloudFormation/Terraform config... sometimes spread over multiple files and having to manually join them in them head to get the full view of the infrastructure. But CDK reads so beautifully and gets rid of so much noise in these templates that I don't care about. Unfortunately... the devops people and those who hold the…

I've not been enjoying my CDK experience, the idea of it is a beautiful one, the practical application is far less so.

The different libraries for the different services act extremely differently, there are frequently breaking changes (we did a minor point release, and now everything is broken)

The tooling doesn't support SSO, even though amazon has been pushing people in that direction for years.

I WANT to like it because you can see it is the way things should be, but until Amazon gets their documentation and tooling in a working state, it isn't nearly the beautiful thing it looks like it should be.

It is a great idea, but really let down by a shitty implementation.

Seriously. When you define a thing. Is it going to create it for you?

Is it going to fall over if it already exists because you ran the same script yesterday? So the thing already exists?

Is it just going to reference a thing which is already there?

It could be any of these, and how it acts is WILDLY different for every service, and also undocumented.

CDK could be good. But it REALLY isn't yet. There is a reason your Devops people are not falling over themselves to use it.

Re: Release of AWS CDKv2 and Construct Hub

#40
post #39
post #17

CDK is absolutely brilliant. My eyes glaze over when I see lines and lines and pages and pages of CloudFormation/Terraform config... sometimes spread over multiple files and having to manually join them in them head to get the full view of the infrastructure. But CDK reads so beautifully and gets rid of so much noise in these templates that I don't care about. Unfortunately... the devops people and those who hold the…

I've not been enjoying my CDK experience, the idea of it is a beautiful one, the practical application is far less so. The different libraries for the different services act extremely differently, there are frequently breaking changes (we did a minor point release, and now everything is broken) The tooling doesn't support SSO, even though amazon has been pushing people in that direction for years. I WANT to like it b…

> but until Amazon gets their documentation and tooling in a working state,

That's...unlikely.

> It could be any of these, and how it acts is WILDLY different for every service, and also undocumented.

CDK is an abstraction over CloudFormation, which is an inconsistent (in how it deals with similar things at the next level down) abstraction over the individual APIs of AWS services, which themselves are not particularly consistent to start with.

> There is a reason your Devops people are not falling over themselves to use it.

Well, lots are, because it's less tedious than raw CloudFormation or thin improvements over it like the Serverless transform, and AFAICT most of the inconsistency is from the underlying CF behavior, so isn't avoided by cutting out the additional layer.

Post reply on HN