Skip to content

kirei/s3pusher

Repository files navigation

S3 Pusher

Utility to watch directory for changes and move modified files to AWS S3.

Usage

usage: s3pusher [-h] [--bucket BUCKET] [--hostname HOSTNAME] [--log-json] [--debug] directory [directory ...]

S3 Pusher

positional arguments:
  directory            Directory to watch for changes

options:
  -h, --help           show this help message and exit
  --bucket BUCKET      S3 bucket name (S3PUSHER_BUCKET environment variable can also be used)
  --fields FIELDS      Comma separated list of key=value pairs to include in S3 object key (S3PUSHER_FIELDS environment variable can also be used)
  --log-json           Log in JSON format
  --debug              Enable debugging

The environment variable S3PUSHER_HOSTNAME may also be used to set field hostname.

Authentication

Environment variables used for authentication can be found in the Boto3 documentation.

Object Names

Files will be uploaded to the specified bucket in the following format:

year=YYYY/month=MM/day=DD/hour=HH/minute=MM/second=SS/uuid=UUID/FILENAME

If --fields provider=xyzzy,hostname=host is specified, the format is:

year=YYYY/month=MM/day=DD/hour=HH/minute=MM/second=SS/provider=xyzzy/hostname=host/uuid=UUID/FILENAME

About

AWS S3 File Pusher

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors