Which combination of actions will meet these requirements?
(Choose two.)
Change the Auto Scaling configuration to replace the instances when they fail the load balancer’s health checks.
Change the target group health check HealthCheckIntervalSeconds parameter to reduce the interval between health checks.
Change the target group health checks from HTTP to TCP to check if the port where the application is listening is reachable.
Enable the available memory consumption metric within the Amazon CloudWatch dashboard for the entire Auto Scaling group. Create an alarm when the memory utilization is high. Associate an Amazon SNS topic to the alarm to receive notifications when the alarm goes off.
Use the Amazon CloudWatch agent to collect the memory utilization of the EC2 instances in the Auto Scaling group. Create an alarm when the memory utilization is high and associate an Amazon SNS topic to receive a notification.
Explanations:
Changing the Auto Scaling configuration to replace instances that fail health checks ensures that unhealthy instances are automatically terminated and replaced with new ones, improving application resilience and availability.
Reducing the HealthCheckIntervalSeconds does not address the underlying issue of memory leaks or application crashes; it may lead to more frequent health checks but does not prevent instances from becoming unhealthy due to memory issues.
Changing health checks from HTTP to TCP only checks if the port is reachable, but does not verify if the application is functioning correctly. This may lead to instances being considered healthy even if the application is down due to memory issues.
While enabling the memory consumption metric is beneficial, Amazon CloudWatch does not provide built-in memory utilization metrics for EC2 instances without additional configuration. Thus, this option alone would not effectively monitor memory usage.
Using the Amazon CloudWatch agent to collect memory utilization metrics provides real-time monitoring of memory usage on EC2 instances. Creating an alarm for high memory utilization, with SNS notifications, allows proactive alerts and improves application resilience against memory issues.