AWS Certified Developer – Associate (DVA-C02) — Question 511

An AWS Lambda function that handles application requests uses the default Lambda logging mechanism to log the timestamp, processing time, and status of requests.

A developer needs to create Amazon CloudWatch metrics based on the logs. The developer needs to write the metrics to a custom CloudWatch metrics namespace.

Which solution will meet these requirements?

Answer options

Correct answer: D

Explanation

Using the CloudWatch embedded metric format (EMF) allows developers to output complex metric data within structured log statements, which CloudWatch Logs automatically parses to create custom metrics in a specified namespace. CloudWatch Logs Insights is a query tool and cannot directly generate or write persistent custom metrics to a namespace in this manner. CloudWatch RUM is designed for real-user monitoring of web applications and is not used for parsing Lambda log outputs into metrics.