Presigner
Presigner is a CLI tool to generate Pre-Signed URL for Amazon S3.
Installation
Add this line to your application's Gemfile:
gem 'presigner'
And then execute:
$ bundle
Or install it yourself as:
$ gem install presigner
Usage
$ presigner generate --bucket foobucket --key bar.txt --duration 3600 --profile default
- Currently, You can provide duration only in seconds.
--profile
option is the value for ~/.aws/credentials. You should write your credentials in the file. ref: http://blogs.aws.amazon.com/security/post/Tx3D6U6WSFGOK2H/A-New-and-Standardized-Way-to-Manage-Credentials-in-the-AWS-SDKs
TODO
- Support another credential provider
--expires
option. It might contain time in a word (e.g. '1h' or '30min')
Contributing
- Fork it ( https://github.com/[my-github-username]/presigner/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request