Fork me on GitHub
#aws
<
2020-09-15
>
zackteo03:09:13

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

jimmy03:09:12

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.

zackteo03:09:16

Right! Are there any references or libraries I would wanna look at? To work with aws?

zackteo03:09:15

Am also considering the intensity demanded if I tackle this task solo :x

dakra07:09:58

For working with the AWS API you can use https://github.com/cognitect-labs/aws-api

zackteo09:09:42

Thanks @UFAP0C8KU ! @U5K8NTHEZ , 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

jumar09:09:15

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)

jumar09:09:57

For the abandoned clojure CDK project I meant this: https://github.com/StediInc/cdk-clj I don't know the other one.

zackteo11:09:48

Isn't it a bad idea since it is abandoned? Or is it because it should still be stable o:

jumar13:09:06

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

viesti13:09:34

Terraform is also a nice tool for defining infrastructure

steveb8n22:09:35

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 :)

include17:09:16

+1 for CDK with Typescript.

jumar06:09:10

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. @U06QSF3BK @U0510KXTU any experience regarding this scenario?

jumar06:09:42

Sorry I meant @U3NP9AM0S not viesti 🙂

viesti06:09:52

nah, I'm curious on hearing too 🙂

viesti06:09:22

Cloudformation has a way to import existing resources these days, don't know how well that plays with CDK

steveb8n06:09:54

most resources in CDK have a fromARN or fromName fn where you can load an existing resource and reference it

viesti06:09:59

With Terraform, you script the resources, possibly creating many of them and can then import the instances

steveb8n06:09:21

so that way you can create new stack resources connected to existing ones

steveb8n06:09:03

but naturally those resources are not “infra as code” so it’s better to replace them with CDK created versions over time

steveb8n06:09:24

CDK is CF under the covers so anything you can do all this just using CF if you want

steveb8n06:09:48

but CDK/typescript gives you compile time checking/intellisense etc

viesti06:09:15

seems like one would do the import onto an already created stack, dunno how the resources end up into the stack though

steveb8n06:09:18

that said, lots of things only fail when you deploy the CDK stack so not everything is compile time

steveb8n06:09:59

your best bet is just try a small stack. it’s really easy to get started. you can answer most questions for yourself then

viesti06:09:10

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 🙂

steveb8n06:09:19

I didn’t know typescript at all when I started

steveb8n06:09:40

yep. Terraform and Pulumi are also good. CDK is AWS only

viesti06:09:04

anyhow, interesting things 🙂

jumar06:09:02

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)

steveb8n06:09:12

glad to help

viesti06:09:48

glad to be part of the discussion 🙂

include08:09:01

@U06BE1L6T timezones… yes as @U06QSF3BK said you have a couple ways to use/import external resources/stacks.

include08:09:26

@U0510KXTU now we have Terraform + CDK - so we can write CDK Typescrypt and gerenate Terraform.

viesti09:09:56

ah that too, had forgotten that Terraform has a CDK thing nowadays also: https://github.com/hashicorp/terraform-cdk

include13:09:19

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.