A web application on Auto Scaling EC2 instances experienced out-of-memory errors. The team increased the app memory and now wants to collect operating system memory metrics in CloudWatch, but no memory metric exists for the instances. What should the administrator do to produce a CloudWatch memory metric for these EC2 instances?
Choose an answer
Tap an option to check your answer.
Correct answer: Use an AMI that has the CloudWatch agent preinstalled..
Why this is the answer
The correct option is to use an AMI that has the CloudWatch agent preinstalled. Standard EC2 monitoring provides basic metrics like CPU utilization, network I/O, and disk I/O, but it does not include operating system-level memory metrics. To collect these custom metrics, the CloudWatch agent must be installed and configured on the EC2 instances. While you could manually install the agent on running instances, using an AMI with it preinstalled ensures that all new instances launched by the Auto Scaling group automatically have the agent and send memory metrics to CloudWatch. Enabling CloudWatch detailed monitoring only increases the frequency of existing standard metrics (from 5 minutes to 1 minute) and does not add new custom metrics like memory usage. Enabling IMDSv2 enhances security for accessing instance metadata but has no impact on collecting OS-level metrics. Using an AMI based on Amazon Linux does not inherently provide memory metrics; the CloudWatch agent still needs to be installed on it.
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