- A
Install the CloudWatch agent on the instance and configure it to collect mem_used_percent; publish JVM heap metrics from the application using PutMetricData
The CloudWatch agent handles OS-level memory automatically once configured. For JVM heap, the application publishes a custom namespace metric via PutMetricData. Both appear in CloudWatch within minutes and can be graphed and alarmed like any native metric.
- B
Enable detailed monitoring on the EC2 instance to increase metric resolution to 1-minute intervals
Why wrong: Detailed monitoring increases the frequency of pre-existing EC2 metrics (CPU, network, disk I/O) from 5 minutes to 1 minute. It does not add memory metrics — EC2 never publishes memory utilization regardless of monitoring detail level.
- C
Configure a CloudWatch Logs metric filter on the application log stream to count lines containing 'OutOfMemoryError'
Why wrong: A metric filter counting OOM errors indicates memory exhaustion only after it occurs, not the percentage of heap used. This is a reactive indicator, not a proactive utilization metric suitable for setting a threshold alarm at 85 percent.
- D
Use AWS Systems Manager Inventory to collect memory data and sync it to CloudWatch
Why wrong: SSM Inventory collects hardware and software configuration data (installed applications, OS details, network config) for compliance and asset management. It does not stream real-time memory utilization metrics to CloudWatch.
Monitor EC2 Memory Metrics in CloudWatch
This SOA-C02 practice question tests your understanding of monitoring, logging, and remediation. Read the scenario carefully and evaluate each option against the stated constraints before committing to an answer. A key principle to apply: cloudWatch custom metrics. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.
An EC2 instance runs a Java application. The operations team wants to monitor heap memory utilization in CloudWatch and set alarms when it exceeds 85 percent. EC2 does not natively publish memory metrics to CloudWatch. What is the simplest way to get this metric into CloudWatch?
Quick Answer
The correct answer is to install the CloudWatch agent on the EC2 instance and configure it to collect mem_used_percent, while having the Java application publish JVM heap metrics using the PutMetricData API. This works because EC2 does not natively publish memory metrics to CloudWatch—it only provides CPU, network, and disk I/O metrics at the hypervisor level. The CloudWatch agent runs inside the instance to capture OS-level memory utilization, and the PutMetricData API allows the application to send custom JVM heap data directly, giving you full visibility into the 85% threshold. On the AWS Certified SysOps Administrator Associate SOA-C02 exam, this scenario tests your understanding that standard EC2 monitoring is insufficient for in-guest metrics, and that the CloudWatch agent is the simplest, agent-based solution for memory monitoring. A common trap is assuming the older CloudWatch Logs agent or a simple script suffices, but only the unified CloudWatch agent can collect both OS metrics and forward custom application metrics. Memory tip: “Agent for OS, API for apps—two tools, one dashboard.”
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 mem_used_percent; publish JVM heap metrics from the application using PutMetricData
Option A is correct because the CloudWatch agent can collect custom metrics like memory utilization from the EC2 instance, and the Java application can directly publish JVM heap metrics to CloudWatch using the PutMetricData API. This combination provides the simplest and most direct way to monitor heap memory utilization and set alarms at the 85% threshold, as EC2 does not natively expose memory metrics.
Key principle: CloudWatch custom metrics
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Install the CloudWatch agent on the instance and configure it to collect mem_used_percent; publish JVM heap metrics from the application using PutMetricData
Why this is correct
The CloudWatch agent handles OS-level memory automatically once configured. For JVM heap, the application publishes a custom namespace metric via PutMetricData. Both appear in CloudWatch within minutes and can be graphed and alarmed like any native metric.
Related concept
CloudWatch custom metrics
- ✗
Enable detailed monitoring on the EC2 instance to increase metric resolution to 1-minute intervals
Why it's wrong here
Detailed monitoring increases the frequency of pre-existing EC2 metrics (CPU, network, disk I/O) from 5 minutes to 1 minute. It does not add memory metrics — EC2 never publishes memory utilization regardless of monitoring detail level.
- ✗
Configure a CloudWatch Logs metric filter on the application log stream to count lines containing 'OutOfMemoryError'
Why it's wrong here
A metric filter counting OOM errors indicates memory exhaustion only after it occurs, not the percentage of heap used. This is a reactive indicator, not a proactive utilization metric suitable for setting a threshold alarm at 85 percent.
- ✗
Use AWS Systems Manager Inventory to collect memory data and sync it to CloudWatch
Why it's wrong here
SSM Inventory collects hardware and software configuration data (installed applications, OS details, network config) for compliance and asset management. It does not stream real-time memory utilization metrics to CloudWatch.
Common exam traps
Common exam trap: answer the scenario, not the keyword
The trap here is that candidates often assume detailed monitoring or Systems Manager Inventory can provide memory metrics, but neither feature collects or publishes memory utilization data to CloudWatch.
Detailed technical explanation
How to think about this question
The CloudWatch agent uses the 'mem_used_percent' metric from the /proc/meminfo file on Linux or performance counters on Windows, while JVM heap metrics require the application to call the PutMetricData API with a custom namespace and dimensions. In production, you would typically configure the agent to collect both OS-level memory and application-level heap metrics, then create a CloudWatch alarm on the combined metric to trigger auto-scaling or notifications when heap usage exceeds 85%.
KKey Concepts to Remember
- CloudWatch custom metrics
- PutMetricData
- CloudWatch agent
- memory utilization
TExam Day Tips
- Watch for words such as best, first, most likely and least administrative effort.
- Review why wrong options are wrong, not only why the correct option is correct.
Key takeaway
CloudWatch custom metrics
Real-world example
How this comes up in practice
An e-commerce site experiences heavy traffic on Black Friday and near-zero traffic during off-peak weeks. Rather than provisioning permanent large VMs, the team uses auto-scaling groups that add capacity automatically under load and reduce it overnight. Questions like this test whether you understand elasticity, availability zones, and cloud compute scaling patterns.
What to study next
Got this wrong? Here's your next step.
Review cloudWatch custom metrics, then practise related SOA-C02 questions on the same topic to reinforce the concept.
- →
Monitoring, Logging, and Remediation — study guide chapter
Learn the concepts, then practise the questions
- →
Monitoring, Logging, and Remediation practice questions
Targeted practice on this topic area only
- →
All SOA-C02 questions
1,546 questions across all exam domains
- →
AWS Certified SysOps Administrator Associate SOA-C02 study guide
Full concept coverage aligned to exam objectives
- →
SOA-C02 practice test guide
How to use practice tests most effectively before exam day
Related practice questions
Related SOA-C02 practice-question pages
Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.
Monitoring, Logging, and Remediation practice questions
Practise SOA-C02 questions linked to Monitoring, Logging, and Remediation.
Reliability and Business Continuity practice questions
Practise SOA-C02 questions linked to Reliability and Business Continuity.
Deployment, Provisioning, and Automation practice questions
Practise SOA-C02 questions linked to Deployment, Provisioning, and Automation.
Security and Compliance practice questions
Practise SOA-C02 questions linked to Security and Compliance.
Networking and Content Delivery practice questions
Practise SOA-C02 questions linked to Networking and Content Delivery.
Cost and Performance Optimization practice questions
Practise SOA-C02 questions linked to Cost and Performance Optimization.
SOA-C02 fundamentals practice questions
Practise SOA-C02 questions linked to SOA-C02 fundamentals.
SOA-C02 scenario practice questions
Practise SOA-C02 questions linked to SOA-C02 scenario.
SOA-C02 troubleshooting practice questions
Practise SOA-C02 questions linked to SOA-C02 troubleshooting.
Practice this exam
Start a free SOA-C02 practice session
Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.
FAQ
Questions learners often ask
What does this SOA-C02 question test?
Monitoring, Logging, and Remediation — This question tests Monitoring, Logging, and Remediation — CloudWatch custom metrics.
What is the correct answer to this question?
The correct answer is: Install the CloudWatch agent on the instance and configure it to collect mem_used_percent; publish JVM heap metrics from the application using PutMetricData — Option A is correct because the CloudWatch agent can collect custom metrics like memory utilization from the EC2 instance, and the Java application can directly publish JVM heap metrics to CloudWatch using the PutMetricData API. This combination provides the simplest and most direct way to monitor heap memory utilization and set alarms at the 85% threshold, as EC2 does not natively expose memory metrics.
What should I do if I get this SOA-C02 question wrong?
Review cloudWatch custom metrics, then practise related SOA-C02 questions on the same topic to reinforce the concept.
What is the key concept behind this question?
CloudWatch custom metrics
About these practice questions
Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →
Keep practising
More SOA-C02 practice questions
- A company uses an Amazon DynamoDB table with on-demand capacity mode. The table handles a workload with a steady baselin…
- A company uses Amazon CloudWatch Logs to store application logs. The SysOps administrator needs to count the occurrences…
- A SysOps administrator needs to monitor the CPU utilization of an Amazon EC2 instance and send an alert when it exceeds…
- A SysOps administrator needs to monitor the CPU utilization of an Amazon EC2 instance fleet and send an alert when the a…
- A company's security policy requires that all Amazon S3 buckets must have server-side encryption enabled. The SysOps adm…
- A SysOps administrator uses AWS CloudFormation to deploy a stack that includes an Amazon EC2 instance. The administrator…
Last reviewed: Jun 11, 2026
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.
Question Discussion
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
Sign in to join the discussion.