Skip to main content

Tadreeb LMS – S3 Bucket Integration

S3 Bucket

Download

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​

ItemValue
Module Slugexternal-storage
Storage Driverlocal / s3
Config FieldsS3_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​

  1. Login to the Admin Panel
  2. Navigate to Settings → External App
  3. Upload the module .zip file
  4. Enable the module

🔐 Step 3: Create AWS S3 Bucket

Create Bucket​

  1. Go to https://aws.amazon.com/console
  2. Navigate to S3 → Create Bucket
  3. Enter:
    • Bucket Name (must be globally unique)
    • Region (e.g., ap-south-1)
  4. Click Create Bucket

🔑 Step 4: Create IAM User & Access Keys

Create IAM User​

  1. Go to IAM → Users → Create User
  2. Give name (e.g., lms-s3-user)
  3. 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:

FieldValue
S3_ACCESS_KEY_IDFrom IAM
S3_SECRET_ACCESS_KEYFrom IAM
S3_BUCKETYour bucket name
S3_DEFAULT_REGIONBucket 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

FeatureDescription
Local → S3Migrates existing files to S3
S3 → LocalRestores files back to server
Test SyncUploads test file on enable
Auto-RevertSwitches back to local if disabled
Clean UninstallResets 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