AWS Certified Developer – Associate / Question #638 of 557

Question #638

A company uses AWS Elastic Beanstalk for a data-intensive application that processes real-time transactions. Recently, during peak traffic, the application's response times have increased. The operations team notices that memory utilization metrics are missing in their monitoring setup. They need to implement a solution to collect detailed memory usage data from the instances.

What should the operations team do to monitor the memory usage effectively?

A

Enable AWS CloudTrail to log memory usage metrics and analyze the logs.

B

Modify the instance user data scripts to install a custom memory monitoring tool.

C

Install and configure the Amazon CloudWatch agent on the instances to collect memory metrics.

D

Create an Amazon CloudWatch alarm based on the existing EC2 metrics to track memory utilization.

Explanation

Answer C is correct because:
- Amazon CloudWatch Agent is designed to collect system-level metrics (e.g., memory, disk, processes) from EC2 instances, which are not included in default EC2 monitoring.
- The application's missing memory metrics indicate that the default CloudWatch setup is insufficient, requiring the agent for detailed data collection.

Why other options are incorrect:
- A (CloudTrail): CloudTrail logs API activity, not system metrics like memory usage.
- B (Custom tool via user data): While possible, it is less efficient than using the native CloudWatch agent, which is AWS-recommended and easier to manage.
- D (CloudWatch alarm on existing EC2 metrics): EC2's default metrics do not include memory utilization, so an alarm cannot be created without first collecting the data via the CloudWatch agent.

Key Takeaway: Use the CloudWatch agent to collect custom/system-level metrics not available in default monitoring.

Answer

The correct answer is: C