AWS Uploader
Upload all files from a local directory to AWS S3.
Note:
- Only supports Linux and doesn't support Windows yet
- Tested on Ubuntu 20.04.2
Installation
First clone repository.
$ git clone https://github.com/MojixCoder/AWS-Uploader.git
Go to cloned directory.
$ cd AWS-Uploader/
Now install requirements.txt
and run aws.py
.
$ pip install -r requirements.txt && python aws.py
Example
When you run aws.py
it receives 6 parameters:
- Directory: Absolute path to directory
- Endpoint URL: AWS endpoint URL
- AWS access key: AWS access key of your storage
- AWS secret key: AWS secret key of your storage
- ACL: Access Control List like private, public-read, etc.
- Bucket name: Bucket name that you want to upload files on.
Let's say you have this directory.
.
├── directory
│ ├── a.txt
│ └── sub_dir1
│ │ └── b.txt
│ └── sub_dir2
│ ├── c.txt
│ └── sub_sub_dir
│ └── d.txt
After it starts uploading files it uses the sub directories as separators.
Uploading files to {bucket_name}...
Uploaded 'a.txt'
Uploaded 'sub_dir1/b.txt'
Uploaded 'sub_dir2/c.txt'
Uploaded 'sub_dir2/sub_sub_dir/d.txt'
4 files uploaded.