Fork me on GitHub
#aws
<
2023-12-22
>
rpatrelle10:12:35

Hi! I am writing a small aws S3 wrapper. I am facing issue with generating presigned url. I don't understand how to fix the endpoint not having https://.<region>.... url but something custom. As I did not find any method allowing that in S3Presignerbuilder , I tried provide to my presigner a s3Client built with (.endpointOverride my-uri) .

(defn get-presigner [client region credentials]
  (-> (S3Presigner/builder)
      (.region (Region/of region))
      (.credentialsProvider (-credentials-provider-v2 credentials))
      ;;the client bellow has endpoint override
      (.s3Client client)
      (.build)))
But this does modify the final presigned url. Can somebody help me in order to set properly the endpoint and obtain a custom endpoint?

radhika12:12:35

instead of giving it an S3Client with endpointOverride, how about using S3Presigner.Builder.endpointOverride directly?

rpatrelle12:12:59

thanks a lot, I missed this method.