This project focuses on hosting and running a web application stack on the AWS cloud by adopting a Lift and Shift approach. The goal is to migrate the existing infrastructure to AWS, leveraging its services to ensure scalability, flexibility, and cost-effectiveness while modernizing the stack.
- Flexible Infrastructure: Enable a scalable and flexible infrastructure to handle varying workloads.
- Pay-as-You-Go Model: Reduce costs by utilizing AWS's pricing model.
- Modernize the Stack: Use modern AWS services to enhance performance and manageability.
- Automation: Implement Infrastructure as Code (IaC) for efficient deployment and management.
- Amazon EC2: Hosts the following components of the application:
- Apache Tomcat server for the web application.
- RabbitMQ for message brokering.
- Memcached for caching.
- MySQL server for database management.
-
Elastic Load Balancer (ELB): Distributes incoming traffic across EC2 instances to ensure high availability and fault tolerance.
-
Auto Scaling: Dynamically adjusts the number of EC2 instances based on traffic and workload.
-
Amazon S3: Stores static content, such as images, files, and backups.
-
Amazon Route 53: Provides private DNS services for internal application communication.
-
AWS Identity and Access Management (IAM): Manages user access and permissions to AWS resources.
-
AWS Certificate Manager (ACM): Provides SSL/TLS certificates for secure communication.
-
GoDaddy DNS: Maps the website name to the Elastic Load Balancer endpoint for public access.
The architecture includes: EC2 instances behind an ELB, with Auto Scaling enabled for scalability. S3 bucket for static asset storage. Route 53 for DNS management. RabbitMQ, Memcached, and MySQL running on dedicated EC2 instances.
- Highly available and fault-tolerant design.
- Pay-as-you-go cost optimization.
- Secure communication via SSL/TLS certificates from ACM.
- Automated scaling for seamless performance during traffic spikes.
-
Login to AWS Account: Access the AWS Management Console using your credentials.
-
Create Key Pairs: Generate key pairs to securely access EC2 instances via SSH.
-
Create Security Groups: Define security group rules to allow necessary inbound and outbound traffic.
-
Launch EC2 Instances Using User Data: Use a bash script in the User Data field to automate instance setup during launch.
-
Update IP to Name Mapping in Route 53: Configure Route 53 to map instance IP addresses to DNS names.
-
Build Application from Source Code: Use Maven to build the application from the source code.
-
Upload Artifacts to S3 Bucket: Store the built application artifacts in an S3 bucket for centralized access.
-
Download Artifacts to Tomcat EC2 Instance: Retrieve the application artifacts from the S3 bucket and deploy them on the Tomcat server.
-
Set Up Elastic Load Balancer with HTTPS: Configure the ELB to distribute traffic and secure it using SSL/TLS certificates from ACM.
-
Map ELB Endpoint to Website Name in GoDaddy DNS: Update GoDaddy DNS records to point the website name to the ELB endpoint.
-
Verify: Test the setup by accessing the website and verifying functionality, security, and performance.
This project demonstrates the Lift and Shift approach to migrating a web application stack to AWS, ensuring scalability, cost-efficiency, and modernization. Automation via IaC further enhances deployment efficiency and manageability.