This project demonstrates an event-driven serverless architecture using AWS services. Whenever a file is uploaded to an Amazon S3 bucket, an AWS Lambda function is automatically triggered to categorize and move the file into appropriate folders based on its type.
User uploads file → S3 Bucket → Lambda Trigger → File organized into folders
-
User uploads a file to S3 bucket
-
S3 triggers Lambda function (ObjectCreated event)
-
Lambda reads file name and detects type
-
File is moved to:
images/documents/videos/others/
-
Loop prevention ensures no re-triggering
- Event-driven automation
- Automatic file categorization
- Loop prevention logic
- Scalable serverless architecture
- AWS S3
- AWS Lambda (Python)
- IAM Roles & Policies
- CloudWatch Logs
| File Type | Destination Folder |
|---|---|
| .jpg, .png | images/ |
| documents/ | |
| .mp4 | videos/ |
| others | others/ |
- Handling S3 folder vs object behavior
- Preventing infinite Lambda execution loops
- Correct IAM role configuration
Files are automatically moved into respective folders after upload.
- Add timestamp-based file renaming
- Store metadata in DynamoDB
- Build frontend upload interface
Jai Dev
