The application allows users to register, log in, search for songs, subscribe/unsubscribe to songs, and view artist images – all hosted on AWS infrastructure.
Hosted on: http://-ec2-public-dns
The app must run on EC2 via standard HTTP(S) ports (80/443) and be accessible through a web browser.
- Login Page: Validates credentials via AWS Lambda and DynamoDB.
- Register Page: Adds users to DynamoDB with duplicate email detection.
- Main Page with:
- User Section: Displays logged-in username.
- Subscription Section: Lists songs the user subscribed to with "Remove" functionality.
- Query Section: Enables filtered music search using title, artist, album, and year.
- DynamoDB: Stores user credentials, music metadata, and subscription info.
- S3: Stores and serves artist images securely.
- API Gateway + Lambda: Processes registration, login, subscription, removal, and querying using RESTful endpoints.
- EC2 Ubuntu Server: Hosts the entire web app using Apache2.
- Frontend: HTML, CSS, JavaScript
- Backend: Java (AWS Lambda Functions)
- AWS Services:
- EC2 (Ubuntu 20.04 LTS)
- DynamoDB
- S3 (for image hosting)
- API Gateway (HTTP methods)
- Lambda (business logic)
Music-project/
├── frontend/
│ ├── login.html
│ ├── register.html
│ ├── main.html
│ └── style.css
├── lambda/
│ ├── LoginUserLambda.java
│ ├── RegisterUserLambda.java
│ ├── SubscribeSongLambda.java
│ └── ...
├── utils/
│ └── UploadImagesToS3.java
├── scripts/
│ └── deploy-app.sh
├── 2025a1.json
└── README.mdShell scripts used to deploy individual Lambda functions and API Gateway endpoints. Includes:
deploy-login_api.sh: Deploys login endpointdeploy-search.sh: Deploys music search APIdeploy-app.sh: Full app deployment
2025a1.json: Source data for songs and artist imagesconfig.json: Dynamic API URL mapping for frontends3_image_links.json: Output mapping of uploaded S3 image URLs
no-image.jpg: Fallback image for missing artistsscreenshots/: UI previews and architecture diagrams
Dockerfiles and compose setup for local Lambda and API Gateway simulation
- Launch a free-tier Ubuntu EC2 instance.
- Install Apache2 and Java.
- Open ports 80 (HTTP) and 443 (HTTPS) in security group.
- Create an S3 bucket.
- Upload artist images using
UploadImagesToS3.java. - Store secure image URLs.
- Create
login,music, andsubscriptiontables. - Load users and songs from JSON via Java programs.
- Deploy all Java-based Lambda handlers.
- Set up REST API endpoints in API Gateway and integrate with Lambda.
- Host HTML and JS files on EC2’s Apache2
/var/www/htmldirectory.
- Use
config.jsonfor dynamic API URL loading in frontend scripts.
This project demonstrates:
- Designing secure, scalable AWS applications.
- Handling real-world CRUD operations via Lambda and API Gateway.
- Optimizing database schema and query performance in DynamoDB.
- End-to-end deployment with proper cloud architecture.