A company runs a critical web application on a fleet of Amazon EC2 instances behind an Application Load Balancer (ALB). The operations team notices that during peak traffic, the ALB reports a high number of HTTP 5xx errors, and CloudWatch metrics show that the target group's HealthyHostCount drops significantly. The application logs indicate that the instances are running out of memory and becoming unresponsive. The company wants to improve the reliability of the application with minimal operational overhead. Which solution should a solutions architect recommend?
Publishing memory metrics via the CloudWatch agent and using a target tracking policy on memory utilization allows the Auto Scaling group to add instances when memory pressure rises, directly addressing the root cause of unresponsiveness. This approach is fully managed, requires no custom logic, and scales automatically, meeting the minimal operational overhead requirement.
Why this answer
The application becomes unresponsive due to memory exhaustion under peak load. A target tracking scaling policy based on memory utilization, fed by CloudWatch agent metrics, automatically adjusts capacity to maintain a target memory level. This directly addresses the root cause and is fully managed, requiring minimal operational effort.
Other options either do not scale dynamically or do not react to memory pressure.
Exam trap
The trap here is assuming that a larger instance type or scheduled scaling solves the problem, when the core issue is the lack of dynamic scaling based on the actual resource bottleneck.