aws

Drew Verlee 2022-09-20T04:41:13.612849Z

Any idea how to get a full list of clients for the https://github.com/cognitect-labs/aws-api? e.g s3, cloudwatch, etc...

Dimitar Uzunov 2022-09-20T09:54:55.400559Z

@drewverlee do you mean the list of APIs? This library just uses the api descriptions from the js sdk. It is described here: https://github.com/cognitect-labs/aws-api#approach I don’t see cloudwatch in the list, but if you are making cloudwatch rules you can use the eventbridge api (aws renamed it)

Dimitar Uzunov 2022-09-20T10:06:40.397189Z

ok so Cloudwatch is there @drewverlee, check out :monitoring, :logs and others

Drew Verlee 2022-09-20T12:43:28.457779Z

@dimitar.ouzounoff Ty, yes i meant the list of apis. I was able to find cloudwatch, though as your comment suggests, there are a couple different takes on logs. I sort of want all the logs, So i can search them...

Dimitar Uzunov 2022-09-20T12:53:48.639679Z

this is the cloudwatch api, it is just that cw is actually multiple services

Daniel Jomphe 2022-09-20T14:56:50.766059Z

I check it here, is that what you want? https://github.com/cognitect-labs/aws-api/blob/main/latest-releases.edn

Drew Verlee 2022-09-20T15:21:00.332039Z

@danieljomphe yep, the list of "api"'s you can pass as the :api key to aws/client seems to be (->> "latest-releases.edn" slurp edn/read-string keys (map name) (map keyword)) it's not obvious from the start thats the case though.

Drew Verlee 2022-09-20T04:43:13.858139Z

would it just be the deps.edn deps key "name"? com.cognitect.aws/logs -> logs -> (aws/client {:api :logs ...})

Drew Verlee 2022-09-20T04:51:44.297669Z

yes, that seems to be the case.

Drew Verlee 2022-09-20T05:22:36.864419Z

i'm guessing someone has built an aws cloudwatch client for clojure and i don't need to re-invent the wheel here... but it might be just as easy using clojures built in https://www.juxt.pro/blog/new-clojure-iteration function

Drew Verlee 2022-09-20T05:28:58.879609Z

Would there be a wider interest in some examples of how to pull data from cloudwatch using aws-api? If so, I might try to clean up the code i write and make a small library and/or set of examples. I mostly foresee having to write some pagination code using the iteration function (as i mention in the thread above). Meanwhile, if you read this and happen to have done this already and want to share notes let me know πŸ™‚

πŸ‘€ 1