Courseiva

SOA-C02 Monitoring, Logging, and Remediation Practice Question

A SysOps administrator needs to monitor the CPU and memory utilization of an EC2 instance running a legacy application that cannot be modified. Which TWO methods can be used to collect this information? (Choose TWO.)

⚠ Common exam trap

Watch out — candidates often assume detailed monitoring or hypervisor metrics include memory utilization, not realizing that memory is an in-guest metric requiring an agent or custom script to collect.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

Install the CloudWatch agent on the instance and configure it to collect memory metrics.

The CloudWatch agent can be installed on an EC2 instance to collect custom metrics, including memory utilization, which is not available by default from the hypervisor. The agent sends these metrics to CloudWatch using the PutMetricData API, enabling monitoring of in-guest resources like memory and disk.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    Enable detailed monitoring on the instance to get memory metrics.

    Why it's wrong here

    Enabling detailed monitoring on an EC2 instance only increases how often CloudWatch polls the existing hypervisor-visible metrics, changing the period from 5 minutes to 1 minute. The metrics AWS/EC2 exposes, such as CPUUtilization and NetworkIn, are all collected from the hypervisor, which cannot see inside the guest operating system. Because memory is managed by the guest OS and is not visible to the hypervisor, detailed monitoring never produces memory metrics.

  • ✓

    Install the CloudWatch agent on the instance and configure it to collect memory metrics.

    Why this is correct

    The CloudWatch agent runs inside the EC2 instance's guest OS and reads memory utilization directly from OS sources, such as /proc/meminfo on Linux or performance counters on Windows. After installation, you configure the agent with a JSON file or the console wizard, and it publishes memory metrics under the reserved CWAgent namespace—for example, mem_used_percent or mem_available. This is the standard, fully supported method for collecting memory metrics because the agent has privileged access to the OS internals, something the hypervisor cannot provide.

  • ✓

    Use a custom script to push memory data to CloudWatch via the PutMetricData API.

    Why this is correct

    A custom script can achieve the same outcome by reading memory utilization from the operating system and then sending those values to CloudWatch using the PutMetricData API call. This valid approach requires the script to have IAM credentials or an instance profile with the cloudwatch:PutMetricData permission, and it lets you define your own namespace, metric names, and dimensions. It is a flexible alternative to the agent, but it places the responsibility for scheduling, batching, and error handling on the sysops administrator.

  • ✗

    Use the EC2 hypervisor metrics available from CloudWatch.

    Why it's wrong here

    The CloudWatch namespace AWS/EC2 includes only metrics that the hypervisor can measure, such as CPUUtilization, NetworkPacketsIn, and VolumeReadBytes. The hypervisor sees the instance as a virtual machine from the outside and has no visibility into how much RAM is allocated or actively used by the guest kernel and processes. Therefore, no memory metric ever appears in the EC2 hypervisor metrics, regardless of whether basic or detailed monitoring is enabled.

  • ✗

    Use AWS Systems Manager Inventory to collect memory utilization.

    Why it's wrong here

    AWS Systems Manager Inventory is a configuration management feature that collects a static inventory of the instance, including installed applications, OS patches, and file metadata on a schedule. It is not designed to report live performance data, and there is no inventory type for memory utilization, CPU usage, or other runtime telemetry. Inventory answers questions like 'what is installed?' rather than 'how much memory is being consumed right now?', so it is not a substitute for the CloudWatch agent or custom metrics.

About these practice questions

One of 1,169 original SOA-C02 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Same concept, more angles

2 more ways this is tested on SOA-C02

These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.

Variation 1. A SysOps administrator needs to monitor the memory utilization of an EC2 instance running a custom application. The instance is not using the default CloudWatch metrics for memory. What should the administrator do to collect memory metrics?

easy
  • A.Enable detailed monitoring on the EC2 instance
  • B.Use AWS Trusted Advisor to check memory utilization
  • C.Use Amazon Inspector to monitor memory
  • ✓ D.Install and configure the CloudWatch agent on the instance

Why D: The default CloudWatch metrics for EC2 include CPU, disk, and network utilization, but not memory utilization. To collect custom metrics like memory usage, you must install and configure the CloudWatch agent on the instance. The agent collects memory and disk metrics from the OS and sends them to CloudWatch as custom metrics.

Variation 2. A SysOps administrator needs to monitor the memory utilization of an EC2 instance running Amazon Linux 2. Which of the following is required to publish memory metrics to CloudWatch?

easy
  • A.Use the CloudWatch Logs agent to parse memory usage from system logs.
  • ✓ B.Install and configure the CloudWatch agent on the instance.
  • C.Enable detailed monitoring on the instance.
  • D.Install the AWS Systems Manager Agent (SSM Agent) and configure it to send metrics.

Why B: The CloudWatch agent is specifically designed to collect custom metrics, such as memory utilization, from EC2 instances and publish them to CloudWatch. Unlike the default EC2 monitoring, which only captures hypervisor-level metrics (CPU, network, disk), memory utilization requires an in-guest agent to read from the operating system's /proc/meminfo or similar interfaces. The CloudWatch agent can be configured via a JSON file to collect memory metrics and send them to CloudWatch using the PutMetricData API.

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This SOA-C02 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the SOA-C02 exam.