Which solution will meet these requirements MOST cost-effectively?
Migrate the database to an Amazon RDS for MySQL DB instance. Create an AMI of the web application. Use the AMI to launch a second EC2 On-Demand Instance. Use an Application Load Balancer to distribute the load to each EC2 instance.
Migrate the database to an Amazon RDS for MySQL DB instance. Create an AMI of the web application. Use the AMI to launch a second EC2 On-Demand Instance. Use Amazon Route 53 weighted routing to distribute the load across the two EC2 instances.
Migrate the database to an Amazon Aurora MySQL DB instance. Create an AWS Lambda function to stop the EC2 instance and change the instance type. Create an Amazon CloudWatch alarm to invoke the Lambda function when CPU utilization surpasses 75%.
Migrate the database to an Amazon Aurora MySQL DB instance. Create an AMI of the web application. Apply the AMI to a launch template. Create an Auto Scaling group with the launch template Configure the launch template to use a Spot Fleet. Attach an Application Load Balancer to the Auto Scaling group.
Explanations:
While migrating the database to Amazon RDS for MySQL and adding a second EC2 instance for scaling is a step in the right direction, using an Application Load Balancer (ALB) with On-Demand Instances doesn’t provide seamless scaling as needed. The ALB can help distribute traffic, but scaling based solely on EC2 instances without Auto Scaling doesn’t meet the requirement for seamless scaling.
Similar to Option A, migrating the database to Amazon RDS for MySQL is a good move, but using Amazon Route 53 weighted routing to distribute traffic manually across two EC2 instances does not provide automated or seamless scaling. It would require manual changes to routing, which isn’t ideal for performance during busy times.
Although migrating the database to Amazon Aurora MySQL DB instance could improve performance, relying on AWS Lambda to stop and change the instance type based on CPU utilization doesn’t provide seamless scaling. This solution is reactive rather than proactive and may cause downtime during scaling events.
Migrating the database to Amazon Aurora MySQL DB instance improves scalability and performance. Using a launch template with Auto Scaling and an Application Load Balancer enables the application to scale seamlessly based on traffic demands. Additionally, using a Spot Fleet could save costs, though this could lead to interruptions depending on spot instance availability. This solution is the most cost-effective and scalable option.