A university runs research workloads in several AWS accounts and uses an external observability platform for dashboards and alerting. The platform accepts telemetry over an HTTPS endpoint in an OpenTelemetry-compatible format.
The university wants CloudWatch metrics from the EC2 and Lambda namespaces, and from its own custom namespace, streamed to the platform in near real time. Metrics from the test accounts are not needed, and the solution should not poll the CloudWatch API.
The team wants the stream to be managed by AWS, with the least custom code.
Which approach meets these requirements?
Choose one answer.
AA. Install the CloudWatch agent on every instance and configure it to forward all of its metrics to the platform's HTTPS endpoint directly, with a separate configuration for each account.
BB. Create a metric stream in each production account with include filters for the three namespaces, OpenTelemetry output, and Firehose delivery to the platform's HTTP endpoint.
CC. Write a Lambda function that calls GetMetricData every minute for each namespace in each account, converts the results to the platform's format and posts them to the HTTPS endpoint.
DD. Build a CloudWatch dashboard in each production account with the three namespaces, and share each dashboard with the platform team so that they can review the graphs.
B. Right: Correct. A metric stream sends the chosen namespaces continuously, and creating streams only in the production accounts leaves out the test accounts. Firehose delivers the OpenTelemetry records to the platform's HTTP endpoint with no polling code. Learn more: Use metric streams (opens in a new tab)
C. Wrong: This polls the CloudWatch API, which the university asked to avoid, and it has to handle pagination, retries and format conversion. The team would maintain all of that code. Learn more: GetMetricData (opens in a new tab)
D. Wrong: A shared dashboard shows graphs to people but sends no telemetry to the external platform, so its dashboards and alerts receive nothing. It does not stream the metrics anywhere.
Explanation
A CloudWatch metric stream sends selected namespaces continuously to a destination, and include filters limit which namespaces leave each production account. Delivery through Amazon Data Firehose to an HTTP endpoint needs no polling code. Host agents, polling Lambda functions and shared dashboards each miss the namespaces, the no-polling rule or the delivery to the platform.
Want more on CloudWatch agent and metric streams? The 5 full-length practice sets have 9 more CloudWatch agent and metric streams questions, 375 in all, none of them in the free exam. One payment of $14.99, no subscription. See the practice sets →