(s3-get-auth region-name s3-bucket-path expire-seconds access-key secret-key)
Create a presigned auth header good for a particular number of seconds. Intended to be as the value of an "Authorization" header.
Be sure to update the CORS permissions on your bucket - see s3-get-url
.
Example:
tech.v3.io.aws-presigned> (s3-get-auth "us-west-2" "innovb.data/investors.transit-json" 3600
(config/get-config :aws-access-key-id)
(config/get-config :aws-secret-access-key))
"X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIA3VHQDFSS6LRD2NEI/20210806/us-west-2/s3/aws4_request&X-Amz-Date=20210806T181354Z&X-Amz-Expires=null&X-Amz-SignedHeaders=host;x-amz-content-sha256&X-Amz-Signature=e162f152649e382d243df085f9772834d7eef9e9f94b0ad19fa0625806f400d3"
Create a presigned auth header good for a particular number of seconds. Intended to be as the value of an "Authorization" header. Be sure to update the CORS permissions on your bucket - see [[s3-get-url]]. Example: ```clojure tech.v3.io.aws-presigned> (s3-get-auth "us-west-2" "innovb.data/investors.transit-json" 3600 (config/get-config :aws-access-key-id) (config/get-config :aws-secret-access-key)) "X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIA3VHQDFSS6LRD2NEI/20210806/us-west-2/s3/aws4_request&X-Amz-Date=20210806T181354Z&X-Amz-Expires=null&X-Amz-SignedHeaders=host;x-amz-content-sha256&X-Amz-Signature=e162f152649e382d243df085f9772834d7eef9e9f94b0ad19fa0625806f400d3" ```
(s3-get-url region-name s3-bucket-path expire-seconds access-key secret-key)
Create presigned url good for a particular number of seconds.
Be sure to update the CORS policy on your bucket: From console - bucket->permissions->cors
[{
"AllowedHeaders": [],
"AllowedMethods": [
"GET"
],
"AllowedOrigins": [
"*"
],
"ExposeHeaders": []
}]
Example:
tech.v3.io.aws-presigned> (s3-get-url "us-west-2" "innovb.data/investors.transit-json" 3600
(config/get-config :aws-access-key-id)
(config/get-config :aws-secret-access-key))
"https://s3-us-west-2.amazonaws.com/innovb.data/investors.transit-json?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIA3VHQDFSS6LRD2NEI/20210806/us-west-2/s3/aws4_request&X-Amz-Date=20210806T180728Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Signature=e41128842cc5a3ffc4bf2e7eef19144e3c6881f03d149c7a15d091f61b182551"
Create presigned url good for a particular number of seconds. Be sure to update the CORS policy on your bucket: From console - bucket->permissions->cors ```console [{ "AllowedHeaders": [], "AllowedMethods": [ "GET" ], "AllowedOrigins": [ "*" ], "ExposeHeaders": [] }] ``` Example: ```clojure tech.v3.io.aws-presigned> (s3-get-url "us-west-2" "innovb.data/investors.transit-json" 3600 (config/get-config :aws-access-key-id) (config/get-config :aws-secret-access-key)) "https://s3-us-west-2.amazonaws.com/innovb.data/investors.transit-json?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIA3VHQDFSS6LRD2NEI/20210806/us-west-2/s3/aws4_request&X-Amz-Date=20210806T180728Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Signature=e41128842cc5a3ffc4bf2e7eef19144e3c6881f03d149c7a15d091f61b182551" ```
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close