This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-12-10
Channels
- # adventofcode (54)
- # announcements (30)
- # asami (13)
- # aws (10)
- # babashka (16)
- # babashka-sci-dev (44)
- # beginners (95)
- # calva (63)
- # clara (10)
- # clj-kondo (3)
- # cljfx (6)
- # cljs-dev (7)
- # cljsrn (1)
- # clojure (68)
- # clojure-europe (59)
- # clojure-nl (7)
- # clojure-norway (12)
- # clojure-spec (6)
- # clojure-uk (6)
- # clojurescript (4)
- # component (4)
- # conjure (5)
- # datomic (3)
- # deps-new (1)
- # events (4)
- # exercism (1)
- # figwheel-main (1)
- # fulcro (33)
- # gratitude (1)
- # improve-getting-started (3)
- # jobs (3)
- # lsp (5)
- # malli (10)
- # membrane (5)
- # music (3)
- # nextjournal (6)
- # off-topic (42)
- # pedestal (2)
- # polylith (14)
- # portal (11)
- # re-frame (42)
- # releases (3)
- # reveal (4)
- # shadow-cljs (62)
- # tools-build (1)
- # tools-deps (3)
- # web-security (1)
- # xtdb (3)
I am having problems with `
:apigatewaymanagementapi
I can’t seem to :GetConnection
:PostToConnection
or :DeleteConnection
. I followed all the instructions in the Cognitect API manual and have a valid endpoint.what error are you seeing? might also be helpful to post the metadata on the response
(and be aware that there are some reports of AWS issues right now)
Here’s what i found:
def r (aws/invoke apigwmgtapi {:op :GetConnection
:request {:ConnectionId connection-id}}))
=> #'com.yardwerkz.components.ring-middleware/r
r
=>
#:cognitect.anomalies{:category :cognitect.anomalies/not-found,
:message ": nodename nor servname provided, or not known"}
(meta r)
=>
{:http-request {:request-method :get,
:scheme :https,
:server-port 443,
:uri "/@connections/KI_kqfLjvHcCGQQ%3D",
:headers {"x-amz-date" "20211210T161455Z",
"x-amz-target" ".GetConnection",
"content-type" "application/x-amz-json-1.1",
"host" "",
"authorization" "AWS4-HMAC-SHA256 Credential=AKIAQ66JWWZ5V3F4MLM4/20211210/us-west-2/execute-api/aws4_request, SignedHeaders=content-type;host;x-amz-date;x-amz-target, Signature=0046c6adfc560b2d9102b0c388f69eb3642906c5f76813eb9e413f7c484d1a02"},
:body nil,
:server-name ""},
:http-response {:cognitect.anomalies/category :cognitect.anomalies/not-found,
:cognitect.anomalies/message ": nodename nor servname provided, or not known",
:body nil}}
(def r (aws/invoke apipost {:op :GetConnection
:request {:ConnectionId connection-id}}))
=> #'com.yardwerkz.components.ring-middleware/r
r
=>
{:message "No method found matching route @connections/ for http method GET.",
:cognitect.anomalies/category :cognitect.anomalies/not-found}
(meta r)
=>
{:http-request {:request-method :get,
:scheme :https,
:server-port 443,
:uri "/production/@connections/",
:headers {"x-amz-date" "20211210T161538Z",
"x-amz-target" ".GetConnection",
"content-type" "application/x-amz-json-1.1",
"host" "",
"authorization" "AWS4-HMAC-SHA256 Credential=AKIAQ66JWWZ5V3F4MLM4/20211210/us-west-2/execute-api/aws4_request, SignedHeaders=content-type;host;x-amz-date;x-amz-target, Signature=469260a8d59c47e93fd9a288d4daa86765055a8477949d448d142cacb688d2ea"},
:body nil,
:server-name ""},
:http-response {:status 404,
:headers {"x-amz-apigw-id" "KJB-sE1avHcFcGQ=",
"connection" "keep-alive",
"x-amzn-requestid" "43c66301-3469-4fee-87b7-ffeab3d9bc6d",
"x-amzn-errortype" "NotFoundException",
"content-length" "79",
"date" "Fri, 10 Dec 2021 16:15:38 GMT",
"content-type" "application/json"},
:body #object[java.io.BufferedInputStream 0x77e80748 "java.io.BufferedInputStream@77e80748"]}}
where
(def apigwmgtapi (aws/client {:api :apigatewaymanagementapi}))
(def apipost (aws/client
{:api :apigatewaymanagementapi
:endpoint-override {:hostname host
:path (str "/" stage "/@connections/")}}))