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://..amazonaws.com/... 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 below 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.

onetom02:06:56

@U01BZRQA0ER below is single L. with double L it means something completely different: deep roar(ing) https://www.dictionary.com/browse/bellow

🙏 1
rpatrelle08:07:29

@U086D6TBN, corrected, thanks.