/S3S

Simple client to upload and share content via S3

Primary LanguagePython

S3S

This tool is used to easily upload and share content via S3

You can upload single files or entire folders, create an archive before upload, and assign a "Pre signed" URL to each file with an expiration period which you have sent or copied from the output.

Before getting started you'll to set your AWS environment (Access keys, bucket)

Please use these System variables:

S3S_BUCKET
S3S_ACCESS_KEY_ID
S3S_SECRET_ACCESS_KEY

Installation

pip install https://github.com/maimon33/S3S/archive/master.zip

Additional Options

Enable Mailer

You can have S3S send the public links generated by S3 via Email.

You'll need to set True on "enable_mailer" and specify your credentials to Gmail to allow forwarding.

place a file in your home directory and name it s3s_config.json


vi ~/s3s_config.json

{
  "s3s": {
    "enable_mailer": true,
    "mailer_username": "user@gmail.com",
    "mailer_password": "password",
  }
}

Examples

s3s list

Listing S3 Objects

$ s3s list files
{
    "test-s3s": {
        "Files": [
            "s3s.py"
        ]
    }, 
    "assi": {
        "Files": [
            "WhatsApp Image 2017-03-19 at 09.15.18.jpeg", 
            "testing/", 
            "testing/testing 2/"
        ]
    }, 
    "maimon": {
        "Files": [
            "with-details.png"
        ]
    }
}

$ s3s list buckets
test-s3s
assi
maimon

s3s upload filename

Specify a file or a folder to upload to S3

$ s3s upload folder
File LICENSE uploaded in 0.640665769577
File README.md uploaded in 0.176363945007
File s3s.py uploaded in 0.199064970016
File s3s.pyc uploaded in 0.164093971252
File setup.py uploaded in 0.167093992233

And now with email action (send link that will expire in 4 days)

$ s3s upload folder -e 4 -s maimon33@gmail.com
File LICENSE uploaded in 0.579058885574
File README.md uploaded in 0.169685125351
File s3s.py uploaded in 0.166599035263
File s3s.pyc uploaded in 0.275018930435
File setup.py uploaded in 0.166900873184

s3s purge BUCKET_NAME

$ s3s purge test-s3s
Are you sure you want to drop the db? [y/N]: y