Which TWO metrics should be monitored in Amazon CloudWatch to detect a potential memory leak in an EC2 instance? (Choose two.)
MemoryUtilization, published as a custom metric by the CloudWatch Agent, is calculated from /proc/meminfo or OS-level memory counters and represents the percentage of actual RAM in use. A memory leak causes this value to climb continuously over time as allocations are never freed, even when the workload is stable. Monitoring this metric reveals the leak as a monotonic upward trend, making it one of the most direct and essential signals for detection.
Why this answer
MemoryUtilization is a custom metric that must be published via the CloudWatch Agent because EC2 does not expose memory metrics by default. Monitoring this metric over time can reveal a steady upward trend in memory usage that does not drop after processes complete, which is a classic symptom of a memory leak.
Exam trap
The trap here is that candidates assume EC2 provides memory metrics by default (like CPUUtilization), but they must be explicitly enabled via the CloudWatch Agent, and they overlook SwapUsage as a complementary indicator of memory pressure from a leak.