This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-07-11
Channels
- # announcements (2)
- # asami (10)
- # aws (2)
- # babashka (28)
- # beginners (103)
- # calva (2)
- # clj-kondo (10)
- # clojure (69)
- # clojure-austin (11)
- # clojure-europe (48)
- # clojure-nl (10)
- # clojure-switzerland (1)
- # clojure-uk (2)
- # clojurescript (6)
- # conjure (2)
- # consulting (1)
- # core-async (2)
- # core-typed (2)
- # cursive (5)
- # datomic (15)
- # jobs (1)
- # malli (4)
- # meander (7)
- # membrane (26)
- # missionary (6)
- # nbb (39)
- # reagent (3)
- # releases (1)
- # ring (3)
- # shadow-cljs (28)
- # spacemacs (2)
- # sql (6)
- # vim (5)
I keep getting the following error when attempting to use timestream from aws-api
. Any tips on how to debug this? It seems to be happening on all the :timestream-write
endpoints. I'm using the latest deps for the api/endpoints/services.
(def tsw (aws/client {:api :timestream-write
:region "us-east-1"}))
(aws/invoke tsw
{:op :CreateDatabase
:request {:DatabaseName "test123"}})
{:__type "com.amazon.coral.service#UnknownOperationException",
:cognitect.anomalies/category :cognitect.anomalies/not-found}
(meta
(aws/invoke tsw
{:op :CreateDatabase
:request {:DatabaseName "test123"}}))
{:http-request
{:request-method :post,
:scheme :https,
:server-port 443,
:uri "/",
:headers
{"x-amz-date" "20220711T200159Z",
"x-amz-target" "Timestream_20181101.CreateDatabase",
"content-type" "application/x-amz-json-1.0",
"accept" "application/json",
"host" "",
"authorization"
"..."},
:body
#object[java.nio.HeapByteBuffer 0x1ad00694 "java.nio.HeapByteBuffer[pos=0 lim=26 cap=26]"],
:server-name ""},
:http-response
{:status 404,
:headers
{"x-amzn-requestid" "b6d35cfb-c4df-4c2c-b819-445df0ed9d65",
"content-length" "63",
"date" "Mon, 11 Jul 2022 20:01:58 GMT",
"content-type" "application/x-amz-json-1.0"},
:body
#object[java.io.BufferedInputStream 0xbf8e637 "java.io.BufferedInputStream@bf8e637"]}}
Ok I got it. Timestream requires a custom endpoint described here: https://docs.aws.amazon.com/timestream/latest/developerguide/API_DescribeEndpoints.html So to use the cognitect lib you need to make a client, get the endpoint address, then make a new client using that endpoint adddress, like so: (def tsw (aws/client {:api :timestream-write :region "us-east-1" :endpoint-override {:hostname (-> (aws/invoke (aws/client {:api :timestream-write :region "us-east-1"}) {:op :DescribeEndpoints :request {}}) :Endpoints first :Address)}}))