Fork me on GitHub

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                       "",
 :cognitect.anomalies/category :cognitect.anomalies/not-found}
  (aws/invoke tsw
    {:op      :CreateDatabase
     :request {:DatabaseName "test123"}}))

 {:request-method :post,
  :scheme         :https,
  :server-port    443,
  :uri            "/",
  {"x-amz-date"   "20220711T200159Z",
   "x-amz-target" "Timestream_20181101.CreateDatabase",
   "content-type" "application/x-amz-json-1.0",
   "accept"       "application/json",
   "host"         "",
  #object[java.nio.HeapByteBuffer 0x1ad00694 "java.nio.HeapByteBuffer[pos=0 lim=26 cap=26]"],
  :server-name    ""},
 {:status 404,
  {"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"},
  #object[ 0xbf8e637 ""]}}


Ok I got it. Timestream requires a custom endpoint described here: 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)}}))

👍 1