An application runs on five Amazon EC2 instances behind an Application Load Balancer (ALB) using a target group. Average CPU utilization is below 10% most of the time, with occasional spikes to 65%. You need to automate scalability to optimize cost while ensuring enough CPU during surges. Which solution meets these requirements?
Choose an answer
Tap an option to check your answer.
Correct answer: Create an EC2 Auto Scaling group. Select the existing ALB and target group. Use a target tracking scaling policy based on the ASGAverageCPUUtilization metric. Set minimum instances to 2, desired capacity to 3, maximum instances to 6, and the target value to 50%. Add the EC2 instances to the Auto Scaling group..
Why this is the answer
The correct solution leverages an EC2 Auto Scaling group (ASG) with a target tracking scaling policy. This policy automatically adjusts the number of instances to maintain a specified average CPU utilization (50% in this case), optimizing cost by scaling down during low utilization and scaling up during spikes. The ASG integrates with the existing ALB and target group, ensuring traffic is distributed correctly. Setting minimum instances to 2 provides high availability, and maximum instances to 6 handles peak loads. The first incorrect option terminates instances based on low CPU, but doesn't scale up during high CPU, failing to ensure enough CPU during surges. The third incorrect option creates an ASG but lacks a dynamic scaling policy, meaning it won't automatically adjust instance count based on CPU. The fourth incorrect option relies on manual intervention via email, which is not an automated solution and is inefficient for real-time scaling.
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