This project is a cloud-based text summarization web application. Users can paste text or upload text files via a frontend interface. The backend uses Amazon Bedrock (Titan Text Lite) to generate a summarized version, stores it in Amazon S3, and returns the summary to the user.
The app is hosted on Amazon EC2 inside a custom VPC, and permissions are managed using IAM roles for secure access to AWS services.
-
Frontend to input text
-
AI-powered text summarization using Amazon Bedrock (Titan Text Lite)
-
Summarized text automatically stored in S3 (summaries/ prefix)
-
Secure AWS setup with IAM roles
-
Fully cloud-based deployment
- AI Layer: Amazon Bedrock (Titan Text Lite)
- Storage: Amazon S3
- Hosting / Deployment: Amazon EC2
- Network / Security: VPC, Security Groups, IAM Roles
- Frontend: HTML, JavaScript
- Backend: Node.js, Express
Explanation:
-
User inputs text on the frontend.
-
Frontend sends POST request to /summarize route in the backend.
-
Backend sends text to Amazon Bedrock Titan Text Lite.
-
Bedrock returns the summarized text.
-
Backend uploads the summary to S3 and sends it back to the frontend.
- AWS Setup
-
S3 Bucket: Create a bucket to store summaries.
-
EC2 Instance:
-
Launch an Ubuntu EC2 instance in a custom VPC.
-
Security Group:
-
SSH (22) → your IP -
HTTP (80) → 0.0.0.0/0 -
Node.js app (3000) → 0.0.0.0/0
-
-
-
IAM Role attached with:
-
bedrock:InvokeModel
-
s3:PutObject
-
-
Amazon Bedrock:
-
Enable Bedrock in your region (us-east-1)
-
Choose Titan Text Lite
-
Ensure EC2 IAM role has permission to invoke models
-
- Backend Setup
- SSH into your EC2 instance:
ssh -i <your-key.pem> ubuntu@<EC2-IP>- Clone git repository
git clone <repo-url>- Install Node.js dependencies:
npm install- Run the backend:
node server.js- Frontend Usage
- Open in browser:
http://<EC2-PUBLIC-IP>:3000/index.html-
Paste text in the textarea → click Summarize
-
See the summary instantly, stored in S3 automatically.
-
IAM Role: Attached to EC2 instance with minimal permissions.
-
S3: Private bucket by default; only EC2 backend can write to it.
-
VPC: Ensures secure network environment.
-
Security Groups: Only required ports are open (22, 80, 3000).



