This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-08-24
Channels
- # adventofcode (2)
- # anglican (1)
- # announcements (4)
- # aws (2)
- # babashka (28)
- # beginners (18)
- # brompton (3)
- # calva (22)
- # clj-kondo (2)
- # cljdoc (29)
- # clojure (41)
- # clojure-europe (28)
- # clojure-gamedev (14)
- # clojure-nl (2)
- # clojure-spec (2)
- # clojure-sweden (1)
- # clojure-uk (6)
- # clojurescript (53)
- # css (3)
- # cursive (6)
- # duct (3)
- # emacs (5)
- # fulcro (29)
- # introduce-yourself (1)
- # liberator (5)
- # lsp (1)
- # malli (11)
- # meander (4)
- # nbb (11)
- # off-topic (17)
- # pathom (2)
- # polylith (8)
- # practicalli (1)
- # react (6)
- # reagent (11)
- # releases (2)
- # rewrite-clj (11)
- # shadow-cljs (59)
- # tools-deps (21)
- # vim (11)
Does cognitect.aws.credentials.CredentialsProvider
support returning an anomaly from the fetch
method and "forwarding" that to invoke
calls? I see that it does work right now, but is it intentional?
(def c (aws/client
{:api :ec2
:region "us-west-2"
:credentials-provider (reify aws-creds/CredentialsProvider
(fetch [_]
{:cognitect.anomalies/category :cognitect.anomalies/forbidden}))}))
(aws/invoke c {:op :DescribeInstances})
=> #:cognitect.anomalies{:category :cognitect.anomalies/forbidden}
It seems like it supports it in https://github.com/cognitect-labs/aws-api/blob/33848c413144db7734db330386c1ae570936c959/src/cognitect/aws/client.clj#L91-L92. My hesitation comes from https://github.com/cognitect-labs/aws-api/blob/33848c413144db7734db330386c1ae570936c959/src/cognitect/aws/credentials.clj#L26 of the fetch method.