aws

Nim Sadeh 2023-12-15T21:14:12.460449Z

has anyone used the Cognitect library with Digital Ocean Spaces? The Spaces product conforms to the S3 protocol and I have actually worked with it before in JavaScript using the JavaScript SDK, but some of the bucket/resource resolution stuff is different because it's not literally on AWS and I am having trouble getting the Cognitect library to talk to it

Nim Sadeh 2023-12-15T21:20:04.756539Z

My setup looks something like this:

(def url "https://.nyc3.digitaloceanspaces.com")

(def s3 (aws/client {:api :s3
                     :credentials-provider (credentials/basic-credentials-provider
                                            {:access-key-id access-key
                                             :secret-access-key secret-key})
                     :endpoint-override {:hostname url}
                     :region "us-east-3"}))
This commands
repl> (aws/invoke s3 {:op :PutObject :request {:Bucket  :Key "hello.txt" :Body "Hello world!"} })
yields
#:cognitect.anomalies{:category :cognitect.anomalies/fault,
                      :message "No known endpoint."}

2023-12-15T21:24:52.886909Z

https://github.com/cognitect-labs/aws-api/issues/150 have you seen this?

2023-12-15T21:27:22.088609Z

It looks like it is saying you may need to supply :region in 2 different places

Nim Sadeh 2023-12-15T21:27:34.717269Z

I did a Google check but embarrassingly did not find this. Looks like there's a workaround here, I'll try it. Thanks!

Nim Sadeh 2023-12-15T21:34:53.879429Z

Ah it's not listing the region in two different places, it's explicitly setting the region to east-2

Nim Sadeh 2023-12-15T21:35:38.802299Z

Definitely would have never figured it out had someone not raised the issue