KnoxDrive is a beginner-friendly web app built with Python Flask that lets you upload files to your own AWS S3 bucket securely.
This project helps you learn how to use AWS IAM + S3 + Python + Boto3 to build real-world cloud-integrated apps.
Before running the project, configure AWS:
-
Go to AWS Console → IAM → Users → Add user
- Enter username (e.g., knoxdrive-user)
- Enable ✅ Programmatic access
- Click "Next" → Attach existing policies directly
- Select ✅ AmazonS3FullAccess
- Click "Next" → Create user
- Save your Access Key ID and Secret Access Key
-
Go to AWS Console → S3 → Create Bucket
- Bucket name: knoxdrive-demo-bucket (must be globally unique)
- Region: us-east-1
- ✅ Block all public access: Enabled
- ✅ Encryption: SSE-S3 (default)
- ✅ Object Ownership: Bucket owner enforced (ACLs disabled)
- Click "Create bucket"
git clone https://github.com/your-username/knoxdrive.git
cd knoxdrivepip install -r requirements.txtCreate a file named .env in the root folder and paste:
AWS_ACCESS_KEY_ID=your-access-key-id
AWS_SECRET_ACCESS_KEY=your-secret-access-key
AWS_REGION=us-east-1
S3_BUCKET=knoxdrive-demo-bucketpython app.pyOpen your browser:
http://localhost:5000/
✅ Upload a file — it will go to your S3 bucket.
knoxdrive/
├── app.py
├── templates/
│ └── index.html
├── .env
├── .gitignore
├── requirements.txt
└── README.md
- Never upload
.envto GitHub - Use IAM user with only S3 access
- Rotate AWS keys regularly
- Keep S3 bucket public access blocke
- Host app on EC2
- Add upload progress bar
- File type/size validation
- Use pre-signed URLs
- Store file metadata in a database
Knox (Rupesh)
GitHub: https://github.com/Rupeshs11
Licensed under the MIT License.