This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-01-06
Channels
- # announcements (18)
- # asami (3)
- # aws (10)
- # babashka (47)
- # beginners (343)
- # calva (36)
- # cider (4)
- # clojure (66)
- # clojure-europe (9)
- # clojure-nl (3)
- # clojure-uk (23)
- # clojurescript (30)
- # community-development (69)
- # conjure (1)
- # eastwood (9)
- # events (7)
- # fulcro (81)
- # graalvm (1)
- # malli (5)
- # meander (1)
- # off-topic (41)
- # pathom (15)
- # rdf (1)
- # reitit (6)
- # sci (57)
- # shadow-cljs (18)
- # spacemacs (4)
- # startup-in-a-month (1)
- # testing (2)
- # vim (1)
We (@jeroenvandijk, @rahul080327, @valtteri and myself) are happy to announce the babashka aws pod! Access AWS directly from babashka scripts with virtually no startup time, accessing all the services that the Cognitect aws-api lib provides access to. https://github.com/babashka/pod-babashka-aws
Is there a way to launch a babashka .CLJ file like a normal bash file? ./my-clj-script.sh I'm asking because I would like to run a BB script in our TeamCity and you can enter some bash in the UI so that would make it easy to use there.
@jeroenvandijk is working on that https://github.com/babashka/pod-babashka-aws/pull/16
@lukaszkorecki If you have specific examples please leave a comment with your usecase
@jeroenvandijk We have 2 custom providers which I'm planning to open source at some point - AWS SSO profile and Fargate+ECS, neither are supported out of the box in aws-api
, the implementation is fairly straightforward but since both reify
CredentialsProvider, I'd assume it's not possible to pull off in BB (it might, I don't know)
@lukaszkorecki Jeroen is adding a credentials_process provider, which lets you hook into a process which grabs the credentials for you, returned as json
it totally can - both providers are pretty simple (couple of HTTP requests and parsing JSON files)
Do you happen to use Okta @lukaszkorecki?
I started implementing support for reify CredentialsProvider but itâs a bit tricky so maybe not worth it if there are other options
We delegate to G-Suite as the iDP, but it should be the same - credentials obtained via aws sso login
are not dependent on the idp I think
Cool đ I didnât try aws sso yet. Was using Okta before sso came out, but I guess similar indeed
it's pretty neat, as we have effectively stopped using aws credentials locally, don't have to use creds to login to the console
even when wrapped in a credential_process
?
aws-cli and aws-sdk seem to work properly with credential_process is my experience. I do have a custom wrapper to manage expirations
here you go, extracted from our private lib: https://gist.github.com/lukaszkorecki/120008f7832e23702e94f4205b8e3df5
awesome thanks!
assumes that aws cli v2 is configured, you can do aws sso login --profile=whatever
and call the AWS APIs
Whatâs the recommended way to parse a date in Babashka e.g. â2021-01-06T17:27:27Zâ in order to get #inst â2021-01-06T17:27:27Zâ
ah yeah, good one. was struggling with java.util.date đ
This also works:
user=> #inst "2021-01-06T17:27:27Z"
#inst "2021-01-06T17:27:27.000-00:00"
but only for literal stringsAh I see:
user=> (java.time.ZonedDateTime/parse "2021-01-06T17:27:27Z")
#object[java.time.ZonedDateTime 0x42c2631c "2021-01-06T17:27:27Z"]
thanks!
You might want java.time.Instant
instead of java.time.ZonedDateTime
. The latter carries around a timezone with it.