Day 59 โ€“ Re-Architecting VProfile Web App on AWS

Yesterday, I deployed my VProfile application on AWS using a Lift and Shift strategy with EC2 instances.
Today, I took it a step further and re-architected the app to leverage AWS Managed Services (PaaS & SaaS) โ€” making it more scalable, maintainable, and cost-efficient.


๐Ÿ”น Why Re-Architect?

While Lift and Shift is quick, it still leaves you managing a lot of infrastructure โ€” patching servers, handling scaling, and configuring databases manually.
By switching to PaaS (Platform as a Service) and SaaS (Software as a Service) offerings, AWS takes over most of these operational tasks.


๐Ÿ”น AWS Services Used

  1. Amazon RDS (Relational Database Service) โ€“ replaced MySQL EC2 instance

    • Fully managed database

    • Automated backups, patching, and replication

  2. Amazon ElastiCache โ€“ replaced Memcached EC2 instance

    • Managed caching service

    • Boosts performance with in-memory caching

  3. Amazon MQ โ€“ replaced RabbitMQ EC2 instance

    • Managed message broker service for reliable communication
  4. AWS Elastic Beanstalk โ€“ deployed the Spring MVC app without manually provisioning servers

    • Handles provisioning, scaling, and monitoring automatically

๐Ÿ”น Architecture Changes

Before:

  • Multiple EC2 instances for DB, caching, messaging, and app server

  • Manual configuration and scaling

After:

  • Application deployed on Elastic Beanstalk

  • RDS for persistent relational database storage

  • ElastiCache for high-speed caching

  • Amazon MQ for messaging

  • AWS handles patching, backups, scaling automatically


๐Ÿ”น DB Initialization

To set up the database with our existing dump:

mysql -h <rds-endpoint> -u <db_user> -p accounts < db_backup.sql

This connects directly to the RDS endpoint instead of a local EC2 instance.


๐Ÿ”น Key Benefits

โœ… Reduced infrastructure management overhead
โœ… Built-in scalability and high availability
โœ… Faster deployments with Elastic Beanstalk
โœ… Cost savings by paying only for managed service usage


๐Ÿ“Œ Next Step: Iโ€™ll get into basics of version control and git


0
Subscribe to my newsletter

Read articles from Shaharyar Shakir directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Shaharyar Shakir
Shaharyar Shakir