aws

http://status.aws.amazon.com/ https://www.expeditedssl.com/aws-in-plain-english
dabrazhe 2020-12-07T13:51:32.182800Z

Hi. Does anyone have an example or can explain how to work with ClientBuilders in AWS SDK in Clojure? I am can create a builder (AmazonKinesisVideoClient/builder) but when trying to (.build) it, I am getting all sorts of errors, eg - call to method withRegion can't be resolved (target class is unknown).

ghadi 2020-12-07T14:12:38.183200Z

@dennisa paste your code

ghadi 2020-12-07T14:13:09.184100Z

BTW Have you tried the Cognitect Labs aws client? Much more native feel

dabrazhe 2020-12-07T20:45:33.184700Z

It's along the lines of

(doto (AmazonKinesisVideoClientBuilder/standard)
  (.withRegion region-const)
  (.withCredentials credential-provider)
....
  (.build))

dabrazhe 2020-12-07T20:47:51.186800Z

I haven't tried the cognitect aws client yet. It's more an API caller. It felt calling the Java SDK from Clojure would be more native : )

alexmiller 2020-12-07T20:50:58.187Z

it's not :)

alexmiller 2020-12-07T20:52:01.188Z

using the java sdk means making function calls to generate a bunch of objects which get turned into a bunch of http calls. the cognitect aws api is a functional api to make those http calls without all the junk in the middle

dabrazhe 2020-12-07T21:07:45.189600Z

Isn't processing java objects returned by the SDK easier than parsing the output of the https calls ? : )

alexmiller 2020-12-07T21:08:34.190100Z

no, it's all autogenerated

alexmiller 2020-12-07T21:08:59.190300Z

amazon publishes data files describing the apis

alexmiller 2020-12-07T21:09:33.190600Z

https://www.youtube.com/watch?v=ppDtDP0Rntw if you're interested in more talking :)

alexmiller 2020-12-07T21:10:10.191Z

also has autogenerated docs and clojure specs

dabrazhe 2020-12-07T22:15:08.193Z

Thank you, will have a look. I guess the cognitect aws client is similar to aws-cli in a way? Does the api it return the native Clojure data stuctures ? : )

ghadi 2020-12-07T22:15:43.193200Z

takes data, returns data

☑️ 1
alexmiller 2020-12-07T22:23:10.193500Z

you can find some examples here https://github.com/cognitect-labs/aws-api/blob/master/README.md#usage

👍 1