Relevant AWS documentation: https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-header-based-auth.html https://docs.aws.amazon.com/AmazonS3/latest/userguide/RESTAuthentication.html
Relevant AWS documentation: https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-header-based-auth.html https://docs.aws.amazon.com/AmazonS3/latest/userguide/RESTAuthentication.html
(as-existing-file file-path)Takes a string with the path to the file and returns a File object if the file exists otherwise nil.
Takes a string with the path to the file and returns a File object if the file exists otherwise nil.
(compute-signature {:keys [credentials str-to-sign region service short-date]})(generate-presigned-url bucket object-key opts)(generate-presigned-url bucket
object-key
credentials
{:keys [region endpoint]
:or {region (:aws/region credentials)
endpoint (:aws/endpoint credentials)}
:as opts})Takes bucket name, object key and a map with options.
The option :path-style true forces the use of the 'old way' of URL's.
Takes bucket name, object key and a map with options. The option `:path-style true` forces the use of the 'old way' of URL's.
(guarantee-credientials {:aws/keys [access-key secret-key] :as credentials})(presign url)(presign url opts)(presign url
credentials
{:keys [ref-time region expires]
:or
{expires "3600" region (:aws/region credentials) ref-time (Date.)}})Take an URL for a S3 object and returns a string with a presigned GET-URL for that particular object. Takes the following options (a map) as the last argument, the map value shows the default values: {:ref-time (java.util.Date.) ; timestamp incorporated into the signature :expires "3600" ; signature expires x seconds after ref-time :region "us-east-1"} ; signature locked to AWS region
By default credentials are read from standard AWS location.
Take an URL for a S3 object and returns a string with a presigned GET-URL
for that particular object.
Takes the following options (a map) as the last argument,
the map value shows the default values:
{:ref-time (java.util.Date.) ; timestamp incorporated into the signature
:expires "3600" ; signature expires x seconds after ref-time
:region "us-east-1"} ; signature locked to AWS region
By default credentials are read from standard AWS location.(sign-request request opts)(sign-request {:keys [body headers method url] :as request}
credentials
{:keys [ref-time region service]
:or {region (:aws/region credentials)
service "execute-api"
ref-time (Date.)}})(signature canonical-url
credentials
{:keys [scope method timestamp region service query-params
content-sha256 signed-headers]})AWS specification: https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-header-based-auth.html Inspired by https://gist.github.com/souenzzo/21f3e81b899ba3f04d5f8858b4ecc2e9
AWS specification: https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-header-based-auth.html Inspired by https://gist.github.com/souenzzo/21f3e81b899ba3f04d5f8858b4ecc2e9
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |