Hi guys, I have this project https://istd50043.github.io/project#implementation-requirements I'm trying to consider the possibility of doing this solo (so that I can do Clojure full stack) I'm thinking the "Production System" can be done with Clojurescript. "Analytics System" can be done with Clojure. But I also need to do automation scripts for AWS - not sure how possible is it to do this with babashka :o I know might be pretty intense to tackle alone. But am wondering how intense/possible is it :x
For working with the AWS API you can use https://github.com/cognitect-labs/aws-api
Thanks @daniel415 ! @jimmy , I will be going ahead with the project in Clojure after all! :D I miraculously found 2 peers to join me to form a 3 man team 🙂 so it isn't as ridiculously daunting anymore
Instead of calling aws api manually consider using a more declarative approach like CloudFormation (rather bad with all that JSON bloat) or better CDK (there was a clojure port but has been abandoned in favor of native TypeScript support)
Do you mean this https://github.com/brabster/crucible? o:
For the abandoned clojure CDK project I meant this: https://github.com/StediInc/cdk-clj I don't know the other one.
Isn't it a bad idea since it is abandoned? Or is it because it should still be stable o:
No, don’t use it. I was broadly speaking about AWS CDK - that’s worth looking at; compiles to CloudFormation and you can write infrastructure code in Typescript, Python, Java, ... to reduce boilerplate
Terraform is also a nice tool for defining infrastructure
I previously used Crucible, then switched to clj-cdk and then to typescript CDK for my clojure /full-stack system. I’m very happy using typescript for just this part. Of course there’s also Terraform, Pulumi, etc. Just pick one :)
+1 for CDK with Typescript.
I've been thinking about starting using CDK (possibly) with Typescript for automating some of our infrastructure. What's unclear to me yet is how well CDK plays with existing resources (based on my current research not su much) - let's say I want define WAF web acl or beanstalk env via CDK and connect them to an existing CloudFront distribution; is there an easy way to do it? To me it looks like with CDK I have to define the whole stack in CDK and if I have resources created manually before I'm out of luck. @viesti @steveb8n any experience regarding this scenario?
Sorry I meant @include not viesti 🙂
nah, I'm curious on hearing too 🙂
Cloudformation has a way to import existing resources these days, don't know how well that plays with CDK
most resources in CDK have a fromARN or fromName fn where you can load an existing resource and reference it
With Terraform, you script the resources, possibly creating many of them and can then import the instances
ah nice
so that way you can create new stack resources connected to existing ones
but naturally those resources are not “infra as code” so it’s better to replace them with CDK created versions over time
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/resource-import-existing-stack.html
Interesting, how is it related to CloudFormation's import then? • https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/resource-import-existing-stack.html • Also found this: https://github.com/aws/aws-cdk-rfcs/issues/52
CDK is CF under the covers so anything you can do all this just using CF if you want
but CDK/typescript gives you compile time checking/intellisense etc
seems like one would do the import onto an already created stack, dunno how the resources end up into the stack though
that said, lots of things only fail when you deploy the CDK stack so not everything is compile time
your best bet is just try a small stack. it’s really easy to get started. you can answer most questions for yourself then
I think I'm in the minority here, but I quite like Terrafrom too, it offers intellisense (IntelliJ has a nice plugin, Emacs has some support too) and the language kind of suits for configuration 🙂
I didn’t know typescript at all when I started
yep. Terraform and Pulumi are also good. CDK is AWS only
anyhow, interesting things 🙂
Perfect, thank you both for all the details! I did CDK workshop but need to do some "real" stuff too - will see how well it plays with our infrastructure (lots of things defined manually via AWS console, some via CloudFormation templates)
glad to help
glad to be part of the discussion 🙂
@steveb8n now we have Terraform + CDK - so we can write CDK Typescrypt and gerenate Terraform.
ah that too, had forgotten that Terraform has a CDK thing nowadays also: https://github.com/hashicorp/terraform-cdk
Yes it’s new but I am willing to give it a try. In the past I only used TF then I jumped into a pure CFN project and now I only code infra with CDK 🙂 yes… I wanna join all my experience in “one code style” and deployment tooling; still I am not a TS developer but until now I was able to move forward.
You could definitely do those things with clojure. For the automation scripts, you could use babashka, but there is no reason you can't use vanilla clojure.
Right! Are there any references or libraries I would wanna look at? To work with aws?
Am also considering the intensity demanded if I tackle this task solo :x