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
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."}https://github.com/cognitect-labs/aws-api/issues/150 have you seen this?
It looks like it is saying you may need to supply :region in 2 different places
I did a Google check but embarrassingly did not find this. Looks like there's a workaround here, I'll try it. Thanks!
Ah it's not listing the region in two different places, it's explicitly setting the region to east-2
Definitely would have never figured it out had someone not raised the issue