Skip to content

Instantly share code, notes, and snippets.

@pjstadig
Created February 25, 2022 14:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pjstadig/4c81f294958990e80dbed4aaf31258fa to your computer and use it in GitHub Desktop.
Save pjstadig/4c81f294958990e80dbed4aaf31258fa to your computer and use it in GitHub Desktop.
Protocol + client
(ns stadig.storage.s3
(:require
[aws.sdk.s3 :as s3]
[stadig.storage.protocol :as proto]))
(defrecord S3Storage
[access-key secret-key]
proto/IStorage
(get [this bucket key]
(s3/get-object this bucket key))
(put [this bucket key value]
(s3/put-object this bucket key value))
(delete [this bucket key]
(s3/delete-object this bucket key))
(close [this]))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment