Fork me on GitHub

I asked this question on zulip the other day and wasn’t able to get very far: I’m going to try my luck reposting it here: I’m trying to see if the cognitect’s aws api will fit my needs as a dynamoDB client. I’d like to be able to run dynamoDB locally with But I can’t figure out how to connect to my local instance with the clojure client. There is an option to pass in an endpoint override, but it doesn’t like it when I specify the port for my local instance like so

(def ddb (aws/client {:api :dynamodb
                      :endpoint-override "localhost:8000"
                      :credentials-provider #_blahblahblah }))
Which will give me this error, obviously trying to tack in the port that I guess is provided by the AWS API spec
{ :cognitect.anomalies/category :cognitect.anomalies/fault, :cognitect.anomalies/message "Malformed IPv6 address at index 8: http://[localhost:3000]:443", :cognitect.http-client/throwable java.lang.IllegalArgumentException: Malformed IPv6 address at index 8: http://[localhost:3000]:443, :body  }
Trying without the port like so :endpoint-override "localhost" and running the local dynamoDB (via docker) configured to listen on port 443 gives me an SSL exception
{ :cognitect.anomalies/category :cognitect.anomalies/fault, :cognitect.anomalies/message "Unrecognized SSL message, plaintext connection?", :cognitect.http-client/throwable Unrecognized SSL message, plaintext connection?, :body  }
Has anyone here had any luck getting something like this to work, even on a different aws service? I’ve tried all the values I can for endpoint-override and none of them will work. I have a feeling that this isn’t what the override is intended for.

Alex Miller (Clojure team)14:02:53

I can't answer your question, but posting an issue at is where the aws-api maintainers work from


@dannyfreeman seems like DDB local doesn't use SSL, right?


the error you received indicates that aws-api is connecting to a plaintext http port and attempting to negotiate a TLS handshake


I don't think the endpoint override functionality in aws-api can do plain http


Sounds like I need to go the route that @alexmiller suggested and post an issue on github to see if I can find a way to override that as well


yes please -- there isn't a hook for it

sheepy 5
💯 5
👍 5

Thanks guys. I’ll work on that later today