This project is a serverless URL shortener built with Spring Boot and integrated with AWS DynamoDB.
- Shorten long URLs into unique short links.
- Scalable storage using DynamoDB.
- Automatic cleanup of expired links after 7 days.
- Serverless and cloud-ready architecture.
- Java + Spring Boot
- AWS DynamoDB (Enhanced Client)
- Lombok
- Scheduler for automated tasks
service/→ Core services (e.g.,CleanupServicefor expired token removal)model/→ Model classes (e.g.,UrlMapping)controller/→ REST API endpointsconfig/→ Project configuration
-
Clone the repository:
git clone https://github.com/your-username/serverless-url-shortener.git cd serverless-url-shortener -
Configure AWS credentials and the table name in
application.yml:dynamodb: tableName: url_shortener
-
Build and run the project:
./mvnw spring-boot:run
- A daily scheduled job removes entries older than 7 days from DynamoDB.
This project is licensed under the MIT License. See the LICENSE file for details.