A company hosts a stateless website analytics application on a single Amazon EC2 On-Demand Instance. The application degrades and returns 5xx errors during busy times. The company needs the application to scale seamlessly. Which solution meets these requirements MOST cost-effectively?
Choose an answer
Tap an option to check your answer.
Correct answer: Create an Amazon Machine Image (AMI) of the web application. Apply the AMI to a launch template. Create an Auto Scaling group that includes the launch template. Configure the launch template to use a Spot Fleet. Attach an Application Load Balancer to the Auto Scaling group..
Why this is the answer
The most cost-effective solution is to use an Auto Scaling group with a launch template, an Application Load Balancer (ALB), and Spot Instances. The Auto Scaling group will automatically scale the number of instances based on demand, ensuring seamless performance during busy times. The ALB distributes traffic efficiently across instances. Using a Spot Fleet (Spot Instances) significantly reduces compute costs compared to On-Demand Instances, making it the most cost-effective choice for a stateless application that can tolerate interruptions. Launching a second On-Demand instance with an ALB or Route 53 provides some scalability but is not as cost-effective as using Spot Instances and doesn't offer automatic scaling. Changing the instance type with a Lambda function and CloudWatch alarm provides vertical scaling, but it causes downtime and is not as flexible or cost-effective as horizontal scaling with an Auto Scaling group and Spot Instances.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed