Question #680
A company has migrated an application to AWS. The frontend is a dynamic web application running on two Amazon EC2 instances behind an Application Load Balancer (ALB). The backend is a Java application running on three EC2 instances behind another ALB. The instances are large, compute-optimized On-Demand Instances sized for peak usage. The application experiences high traffic during business hours but minimal traffic during evenings and weekends. A solutions architect needs to optimize costs without affecting availability. Which two steps should be taken?
Change all EC2 instances to Spot Instances.
Migrate the frontend to a serverless architecture using AWS Lambda and API Gateway.
Deploy the backend using AWS Fargate with Spot capacity providers.
Change the backend instances to general purpose burstable instances with the same vCPU count.
Implement Auto Scaling groups for both frontend and backend to scale in during off-peak hours.
Explanation
The correct answers are B and D. Migrating the frontend to AWS Lambda and API Gateway (B) eliminates EC2 costs, as serverless scales automatically and charges per request, ideal for variable traffic. Changing backend instances to burstable (D) reduces costs by using cheaper instance types suited for variable CPU usage.
Other options: A (Spot Instances) risks interruptions, affecting availability. C (Fargate Spot) may disrupt backend tasks. E (Auto Scaling) alone doesn't address over-provisioned instance types, making B and D more effective. Key points: Use serverless for variable frontend traffic and burstable instances for backend to optimize costs while maintaining availability.
Answer
The correct answer is: BD