Developed the elastic face recognition application using IaaS resources from AWS. Implemented the application tier of a multi-tiered cloud application, integrated a machine learning model for face recognition, and built an autoscaling mechanism to enable dynamic scaling of the application tier on demand.
- EC2
- Simple Queue Service (SQS)
- S3
- SimpleDB
- Frontend API Server (
server.py): Handles image uploads, sends processing requests, and returns results. - EC2 Auto-Scaling Controller (
controller.py): Manages EC2 instances dynamically based on workload. - Backend Worker (
backend.py): Processes images and sends results back via SQS.
✅ Responsibilities:
- Implements a FastAPI-based HTTP server.
- Uploads images to AWS S3.
- Sends image processing requests to the SQS request queue.
- Waits for responses from the SQS response queue.
- Returns the processed results to the user.
🔧 Tech Stack:
- FastAPI
- AWS S3
- AWS SQS
- Python
✅ Responsibilities:
- Monitors the SQS request queue for incoming tasks.
- Starts EC2 instances when demand increases.
- Stops unused EC2 instances when demand decreases.
- Ensures efficient resource utilization.
🔧 Tech Stack:
- AWS SQS
- AWS EC2
- Python
✅ Responsibilities:
- Runs on EC2 instances to process tasks.
- Reads messages from the SQS request queue.
- Performs image processing (e.g., OCR, object detection).
- Sends results to the SQS response queue.
🔧 Tech Stack:
- Python
- AWS SQS
- AWS S3
- User uploads an image via
server.py(FastAPI). - Server sends a request to the SQS request queue.
controller.pystarts EC2 instances based on the queue size.backend.pyrunning on EC2 processes the image.- Result is sent to the SQS response queue.
server.pyretrieves and returns the response to the user.controller.pystops EC2 instances when no requests remain.
- Python 3.x
- AWS IAM AccessKeys
- Required Python dependencies (
boto3,fastapi,uvicorn)
-
Clone the repository:
git clone https://github.com/TejasParse/cloud-project-autoscaler.git cd cloud-project-autoscaler -
Install the dependencies
pip3 install boto3 fastapi uvicorn
-
Update the
backend.py,controller.pyandserver.pywith AWS Access Keys -
Start the
backend,controllerandserverindividuallypython3 backend.py python3 controller.py python3 server.py
