AWS Certified Developer – Associate (DVA-C02) — Question 484
A company runs an application on Amazon EC2 instances in an Auto Scaling group. The application experiences variable loads throughout each day.
The company needs to collect detailed metrics from the EC2 instances to right-size the instances. The company also wants to monitor custom application metrics to ensure the application is performing efficiently.
Which solution will meet these requirements?
Answer options
- A. Install the AWS X-Ray agent on the instances. Configure the agent to collect the EC2 instance metrics and the custom application metrics.
- B. Install the Amazon CloudWatch agent on the instances. Configure the agent to collect the EC2 instance metrics and the custom application metrics.
- C. Install the AWS SDK in the application’s cade. Update the application to use the AWS SDK to collect and publish the EC2 instance metrics and the custom application metrics.
- D. Configure AWS CloudTrail to capture and analyze the EC2 instance metrics and the custom application metrics.
Correct answer: B
Explanation
The Amazon CloudWatch agent is the recommended tool for collecting in-depth system-level metrics (such as memory usage) from EC2 instances and publishing custom application metrics. AWS X-Ray is designed for tracing and analyzing distributed applications rather than collecting system metrics, and AWS CloudTrail records API calls rather than performance metrics. While the AWS SDK can publish custom metrics, it is not designed to gather OS-level EC2 performance metrics.