An implementation of the S3 API in clojure, using konserve as the backing store.
(def s4 (s4.core/make-server! {}))
(def port (-> @s4 :bind-address (.getPort)))
(swap! (-> @s4 :auth-store :access-keys) assoc "ACCESSKEY" "SECRETKEY")
(def s3-client (cognitect.aws.client.api/client
{:api :s3
:credentials-provider (cognitect.aws.credentials/basic-credentials-provider {:access-key-id "ACCESSKEY"
:secret-access-key "SECRETKEY"})
:endpoint-override {:protocol "http"
:hostname "localhost"
:port port}}))
(cognitect.aws.client.api/invoke s3-client {:op :ListBuckets})
Includes:
I wanted to run unit tests against an S3 facade, and that fakes3 thing both now requires a license key, and it isn't compatible with the S3 API enough to make the cognitect client happy.
So I'm coding this out of spite.
Can you improve this documentation?Edit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close