The s3-signer package

[Tags: bsd3, library]

s3-signer creates cryptographically secure Amazon S3 URLs that expire within a user-defined period. It allows uploading and downloading of content from Amazon S3. Ideal for AJAX direct-to-s3 uploads via CORS and secure downloads. Web framework agnostic with minimal dependencies.

 module Main where
 import           Network.S3
 main :: IO ()
 main = print =<< generateS3URL credentials request
   where
     credentials = S3Keys "<public-key-goes-here>" "<secret-key-goes-here>"
     request     = S3Request S3GET "bucket-name" "file-name.extension" 3 -- three seconds until expiration

Result

 S3URL "https://bucket-name.s3.amazonaws.com/file-name.extension?AWSAccessKeyId=<public-key-goes-here>&Expires=1402346638&Signature=1XraY%2Bhp117I5CTKNKPc6%2BiihRA%3D"

Properties

Versions0.1.0.0, 0.2.0.0
Change logNone available
Dependenciesbase (==4.7.*), base64-bytestring, cryptohash, http-types, time, utf8-string
LicenseBSD3
Copyright2014 David Johnson
AuthorDavid Johnson <djohnson.m@gmail.com>
MaintainerDavid Johnson <djohnson.m@gmail.com>
CategoryAWS, Network
Home pagehttps://github.com/dmjio/s3-signer
Bug trackerhttps://github.com/dmjio/s3-signer/issues
Source repositoryhead: git clone https://github.com/dmjio/s3-signer
UploadedTue Aug 12 15:36:53 UTC 2014 by DavidJohnson
DistributionsNixOS:0.2.0.0
Downloads234 total (13 in last 30 days)
StatusDocs uploaded by user
Build status unknown [no reports yet]

Modules

[Index]

Downloads

Maintainers' corner

For package maintainers and hackage trustees