Scala script to create an AWS S3 requests via the Query String Request Authentication Alternative.
S3 allows anyone to access a private S3 resource if they provide an authentication parameter on the request. This parameter is valid until a particular date and needs to be signed using your AWS secret.
This script takes your AWS key, the AWS secret, the bucket you want to access and the object in the bucket and returns the signed URL. The form of the return result is a cURL command for my convenience, but of course you can take the URL and do what you want with it.
To run, install SBT and run:
$ git clone email@example.com:aws-qs-sig.git
$ cd aws-qs-sig
...you'll be prompted for the parameters (or you can just tag them all on after the run command).
- Hard coded to use AWS EU zone. Feel free to fix that if you use the US zone.