Tadreeb LMS – S3 Bucket Integration
S3 Bucket
AWS S3 External Storage Module (v1.0.0)
Overview
This module enables integration between the application and Amazon S3 for external file storage.
It allows the system to:
- Store uploaded files in S3 instead of local server
- Improve scalability and performance
- Serve files securely using pre-signed URLs
Module Information
| Item | Value |
|---|---|
| Module Slug | external-storage |
| Storage Driver | local / s3 |
| Config Fields | S3_ACCESS_KEY_ID, S3_SECRET_ACCESS_KEY, S3_BUCKET, S3_DEFAULT_REGION |
Installation & Setup
Step 1: Download External Storage Module
Download the AWS S3 External Storage Module (v1.0.3) package.
Step 2: Upload Module
- Login to the Admin Panel
- Navigate to Settings → External App
- Upload the module
.zipfile - Enable the module
🔐 Step 3: Create AWS S3 Bucket
Create Bucket
- Go to https://aws.amazon.com/console
- Navigate to S3 → Create Bucket
- Enter:
- Bucket Name (must be globally unique)
- Region (e.g., ap-south-1)
- Click Create Bucket
🔑 Step 4: Create IAM User & Access Keys
Create IAM User
- Go to IAM → Users → Create User
- Give name (e.g., lms-s3-user)
- Select:
- Programmatic Access
Attach Permissions
Attach policy:
AmazonS3FullAccess
Generate Keys
After creating user, copy:
- Access Key ID → S3_ACCESS_KEY_ID
- Secret Access Key → S3_SECRET_ACCESS_KEY
⚙️ Step 5: Configure in Application
Go to:
Settings → External App → External Storage
Fill:
| Field | Value |
|---|---|
| S3_ACCESS_KEY_ID | From IAM |
| S3_SECRET_ACCESS_KEY | From IAM |
| S3_BUCKET | Your bucket name |
| S3_DEFAULT_REGION | Bucket region |
Click Save
Functionality
When enabled:
- Storage driver switches from local → S3
- Files are uploaded directly to S3
- File URLs are generated dynamically
- Uses pre-signed URLs (default: 60 min expiry)
Sync & Migration
| Feature | Description |
|---|---|
| Local → S3 | Migrates existing files to S3 |
| S3 → Local | Restores files back to server |
| Test Sync | Uploads test file on enable |
| Auto-Revert | Switches back to local if disabled |
| Clean Uninstall | Resets storage config |
Environment Synchronization
Automatically updates .env:
FILESYSTEM_DRIVER=s3
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_DEFAULT_REGION=
AWS_BUCKET=
AWS_URL=
Notes
- Ensure IAM user has correct permissions
- Bucket must be in correct region
- Avoid public buckets — use pre-signed URLs
- Always test before enabling in production