aws

Kari Marttila 2025-03-07T08:41:11.468699Z

I guess the Cognitect AWS API does not support S3 presigned urls? (like this AWS Java SDK shows: https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/examples-s3-presign.html )

(comment
  (require '[cognitect.aws.client.api :as aws])
  (def s3 (aws/client {:api :s3})) 
  (def s3-doc (aws/ops s3))
  (filter #(clojure.string/includes? (clojure.string/lower-case (name %)) "sign") 
          (keys s3-doc))
  ;;=> ()
  (filter #(clojure.string/includes? (clojure.string/lower-case (name %)) "pre")
          (keys s3-doc))
  ;;=> ()  
  )

lukasz 2025-03-07T15:21:11.136159Z

URL pre-signing is not an API feature - every AWS SDK implements it on its own - so you either pull in the S3 SDK for it or write it yourself (I did both, don't recommend the former)

Bingen Galartza Iparragirre 2025-03-07T15:36:47.061449Z

They have recently published a pure CLJ library that builds the presigned URLs. Haven't used it myself. You might want to give it a look. https://github.com/jacobemcken/aws-simple-sign

❤️ 1
Kari Marttila 2025-03-07T17:04:13.671309Z

Thanks!

scottbale 2025-03-10T01:37:14.864869Z

Correct, aws-api does not (yet) support s3 presigned urls. Just FYI there is an open aws-api issue about this https://github.com/cognitect-labs/aws-api/issues/5