CI/CD Pipeline for Spring Boot CRUD App on AWS ECS

Overview
This project demonstrates a real-world CI/CD pipeline for deploying a Java Spring Boot CRUD application using GitLab CI/CD and AWS ECS (Fargate).
The application is containerized with Docker, stores data in AWS RDS MySQL, and follows production-ready DevOps practices.
It showcases how to automate build, test, and deployment workflows with scalability, security, and zero-downtime deployments in mind.
Architecture
- GitLab CI/CD for pipeline automation
- Docker for containerization
- AWS ECR for container image storage
- AWS ECS (Fargate) for container orchestration
- AWS RDS MySQL for database persistence
- AWS EFS for shared storage (if required)
Key Highlights
✅ Spring Boot CRUD web application
✅ Dockerized and deployed on AWS ECS (Fargate)
✅ Automated GitLab CI/CD pipeline
✅ AWS RDS MySQL integration
✅ Zero-downtime deployment strategy
✅ Secure, scalable, production-ready workflow
CI/CD Pipeline Flow
- Code pushed to GitLab repository
- GitLab CI triggers pipeline
- Application build and test
- Docker image build
- Image pushed to AWS ECR
- ECS task definition updated
- Application deployed to ECS service
- Database connectivity via AWS RDS
CRUD Application Features
🔹 User registration with encrypted passwords
🔹 Image upload support
🔹 Pagination and flash messages
🔹 Custom error handling (404, 500)
🔹 Optimized and secure database schema
Tech Stack
Backend
- Java
- Spring Boot
- Spring Data JPA
- Spring MVC
- Thymeleaf
Database
- MySQL (AWS RDS)
DevOps & Cloud
- GitLab CI/CD
- Docker
- AWS ECS (Fargate)
- AWS ECR
- AWS RDS
- AWS EFS
Tools
- Spring Tool Suite (STS)
- Git / GitLab
Database Schema
CREATE DATABASE boot_crud_db;
USE boot_crud_db;
CREATE TABLE users (
id BIGINT(20) NOT NULL AUTO_INCREMENT,
dob DATE DEFAULT NULL,
email VARCHAR(255) UNIQUE,
name VARCHAR(255),
password VARCHAR(255),
image VARCHAR(255),
PRIMARY KEY (id)
);
Why This Project Matters
- This project reflects end-to-end DevOps ownership, combining:
- Backend engineering (Spring Boot & MySQL)
- CI/CD automation (GitLab pipelines)
- Containerization (Docker)
- Cloud-native deployment (AWS ECS)
- It demonstrates my ability to design, automate, and deploy production-grade applications.
Use Cases
- DevOps portfolio showcase
- CI/CD reference project
- AWS ECS deployment example
- Real-world cloud automation workflow
Future Enhancements
- Blue/Green deployments on ECS
- Secrets management using AWS Secrets Manager
- Monitoring with CloudWatch + Prometheus
- Infrastructure as Code with Terraform
- GitOps-style deployments
Acknowledgements
Thanks to @ProjectsAndPrograms for the base Spring Boot CRUD reference.
License
MIT License © 2025