Day 58 โ Lift and Shift: Deploying the VProfile Project to AWS


Today, I implemented the Lift and Shift migration strategy to move my VProfile application into AWS.
The goal was simple: move the project as-is from a local environment to AWS with minimal code changes, while keeping the same stack and architecture.
๐น Step 1 โ Understanding the Lift and Shift Approach
Lift and Shift is a cloud migration strategy where you take an existing application, package it, and run it on the cloud without redesigning or refactoring.
This approach is fast, but requires careful configuration to ensure security, networking, and scalability.
๐น Step 2 โ AWS Resources Setup
Created AWS Key Pair โ for SSH access to EC2 instances
Configured Security Groups โ allowing inbound/outbound rules for:
SSH (22)
HTTP (80)
HTTPS (443)
Custom ports for MySQL, RabbitMQ, Memcached, ElasticSearch
Launched EC2 Instances โ provisioned Amazon Linux / Ubuntu servers for each service
Connected Frontend to Backend โ via internal private IPs in the same VPC
๐น Step 3 โ Load Balancer & Auto Scaling
Added Elastic Load Balancer (ELB) to distribute traffic across multiple Tomcat instances
Configured Auto Scaling Group to handle peak load and ensure high availability
๐น Step 4 โ Stack Used
Prerequisites
JDK 17 or 21
Maven 3.9
MySQL 8
Technologies
Spring MVC
Spring Security
Spring Data JPA
Maven
JSP
Tomcat
MySQL
Memcached
RabbitMQ
ElasticSearch
๐น Step 5 โ Database Setup
The VProfile project comes with a prebuilt MySQL dump file located at:
/src/main/resources/db_backup.sql
To import:
mysql -u <user_name> -p accounts < db_backup.sql
๐น Key Takeaways
โ
Lift and Shift is a fast way to migrate applications to the cloud
โ
Proper security group configuration is crucial to avoid open access
โ
Using ELB + Auto Scaling ensures fault tolerance and scalability
โ
AWS makes it easier to recreate complex local architectures in a managed cloud environment
๐ Next Step: I will start optimizing this deployment by introducing Re- Architecting Web App on AWS Cloud [PAAS & SAAS]
Subscribe to my newsletter
Read articles from Shaharyar Shakir directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
