Q91 — AWS DVA-C02 Ch.2
Question 91 of 100 | ← Chapter 2
A developer has built an application that runs on an Amazon EC2 instance and generates a value every minute. The developer wants to monitor and plot the generated values over time without logging into the instance every minute.
- A. Use the default Amazon CloudWatch metrics reported for all EC2 instances. View each value from the CloudWatch console.
- B. Modify the application to store each value every minute in a file on Amazon S3, named with a timestamp.
- C. Use the available AWS SDK to publish each generated value as a custom metric to Amazon CloudWatch. ✓
- D. Store each value as a variable and add that variable to the list of EC2 metrics reported to the Amazon CloudWatch console.
Correct Answer: C. Use the available AWS SDK to publish each generated value as a custom metric to Amazon CloudWatch.
Explanation
Option C is correct. Amazon CloudWatch is designed for monitoring and visualizing metric data. To monitor custom application-generated values, developers must publish them as custom metrics using the AWS SDK. Option A’s default EC2 metrics do not include application-specific values. Option B stores data in S3 but lacks real-time monitoring and visualization capabilities. Option D incorrectly assumes variables can be added to the default EC2 metric set — this is not supported. Thus, C is the appropriate implementation.