This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-08-22
Channels
- # aws (12)
- # babashka (24)
- # beginners (51)
- # biff (2)
- # cherry (4)
- # cider (2)
- # clj-kondo (4)
- # cljs-dev (19)
- # clojure (70)
- # clojure-australia (4)
- # clojure-europe (39)
- # clojure-nl (4)
- # clojure-norway (6)
- # clojure-spec (9)
- # clojurescript (21)
- # component (6)
- # cursive (18)
- # data-science (9)
- # datomic (18)
- # events (2)
- # expound (4)
- # fulcro (15)
- # graalvm (2)
- # graphql (5)
- # jobs (1)
- # juxt (2)
- # leiningen (8)
- # malli (4)
- # meander (21)
- # nrepl (3)
- # observability (14)
- # off-topic (49)
- # other-languages (1)
- # pathom (13)
- # pedestal (7)
- # rdf (5)
- # re-frame (10)
- # reitit (1)
- # sql (4)
- # squint (30)
- # tools-deps (1)
- # vim (11)
The value for an aws-api CreateStack is described like this
:Parameters
[:seq-of
{:ParameterKey string,
:ParameterValue string,
:UsePreviousValue boolean,
:ResolvedValue string}]
So what i supply is like this:
[{:ParameterKey "AppName", :ParameterValue "api"}]
And the warnings me the key should be a string
{ :path [ :Parameters :ParameterValue ], :pred clojure.core/string?, :val 2, :via [ :cognitect.aws.cloudformation/CreateStackInput :cognitect.aws.cloudformation/Parameters :cognitect.aws.cloudformation/Parameter :cognitect.aws.cloudformation/ParameterValue ], :in [ :Parameters 1 :ParameterValue ] }
So i make the key a string and try again and i'm told the parameters don't have values...
"Parameters: [AppName ...] must have values
i'm starting to guess the warnings are coming from the spec (aws/validate-requests cf-with-assumed-role true)
and that there wrong...(def cf (aws/client {:api :cloudformation}))
(aws/doc cf :CreateStack)
^^ to figure this kind of thing out using the built-ins
the abbreviated request is {:Parameters [{"ParameterKey" "AppName", "ParameterValue" "api"} ...]}
Maybe it's supposed to just be {:Parameters {"AppName" "api"}}
{:Parameters [{"AppName" "api"}...]}
the error you had was { :path [ :Parameters :ParameterValue ], :pred clojure.core/string?, :val 2
- which looks like the :ParameterValue value was supposed to be a string, but was the number 2
then you "So i make the key a string" - I think you took the wrong turn here
hmm yes
Thanks Alex, i forgot the first rule (for me at least) is to just use expound rather then try to manually read the spec. It was the fact that one of the values wasn't a string