-
bash
-
s3cmd (apt-get install s3cmd)
-
inotify-tools (apt-get install inotify-tools)
-
xmllint (apt-get install libxml2-utils)
See also, and tested in Dockerfile
s3cmd --configure --config=<your s3 bucket>.cfg
provide it credentials. A file will be created, which can be used by s3cmd later on.
I tested it out in a (custom) ubuntu image
make docker
make test S3=<your s3 bucket>
This will watch your /tmp/<bucket name> and sync it to s3://<bucket name>
The script can be crontabbed, but something must be arranged to keep it alive. May be it can just be put to inittab.
It supports only one directory/s3 now. May be we can just have an instance per directory.
Routing to different s3-targets could just be done by splitting the S3 string.
Might have some issue if the files are written in place, en not moved into the source directory. We may have to have an extra step then.