aws

http://status.aws.amazon.com/ https://www.expeditedssl.com/aws-in-plain-english
chrisulloa 2018-12-05T05:22:21.037300Z

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?

dottedmag 2018-12-05T07:39:32.039200Z

@christian.gonzalez Probably because nobody got around to implement CredentialsProvider via map. But you can do it yourself if you need, can't you?

alexmiller 2018-12-05T13:10:51.040600Z

Yes, can definitely do it yourself like that

alexmiller 2018-12-05T13:11:26.041600Z

Might be reasonable to have this in the api though - I’ve already written this code too

alexmiller 2018-12-05T13:11:43.042200Z

Please file a github issue on the api...

chrisulloa 2018-12-05T13:54:26.042900Z

Yeah I’ll file an issue thanks guys! I wasn’t sure if there was reasoning behind it.

alexmiller 2018-12-05T14:15:53.043400Z

I think the priority was to match the Java SDK first