2

Is there an easy way to generate a Cloudfront Signed URL in Clojure?

I'm using Amazonica for S3 (which works great):

(s3/set-s3client-options {:path-style-access true})
(aws/defcredential s3_accesskey s3_secretkey)
(s3/generate-presigned-url bucket key (-> 6 hours from-now))

Is there anything similar for Cloudfront?

Stéphane Bruckert
  • 21,706
  • 14
  • 92
  • 130
stukennedy
  • 1,088
  • 1
  • 9
  • 25
  • 1
    are you asking how to generate a url such that anyone who posses it will be allowed to access a file you are serving through a program hosted on cloudfront, or are you asking how to generate a url, for use by an application hosted in cloudfront to allow that application to download a file from an s3 bucket? – Arthur Ulfeldt Sep 30 '15 at 21:42
  • neither ... the application is not hosted on Cloudfront. The file is hosted on S3 and distributed through Cloudfront. This is a standard process (generating a signed URL for a restricted access file), but I haven't done it in Clojure before, I already have an answer though that I will post shortly. – stukennedy Oct 01 '15 at 21:50

0 Answers0