Question about the cognitect-labs/aws-api, if I want to pass in a set of credentials (rather than setting env variables), doing something like this works:
(require '[cognitect.aws.credentials :refer [CredentialsProvider]]
'[cognitect.aws.api :as aws])
(defn credentials-provider
[access-key secret-key]
(reify CredentialsProvider
(fetch [_]
{:aws/access-key-id access-key
:aws/secret-access-key secret-key})))
(def s3-client (aws/client {:api :s3 :region "us-east-1"
:credentials (credentials-provider access-key secret-key)}))
But is there any reason why it doesn’t allow us to just pass in a map with the credentials?@christian.gonzalez Probably because nobody got around to implement CredentialsProvider
via map. But you can do it yourself if you need, can't you?
Yes, can definitely do it yourself like that
Might be reasonable to have this in the api though - I’ve already written this code too
Please file a github issue on the api...
Yeah I’ll file an issue thanks guys! I wasn’t sure if there was reasoning behind it.
I think the priority was to match the Java SDK first