A Lambda function logs timestamps, processing times, and request statuses using the default Lambda logging (CloudWatch Logs). You need to create CloudWatch metrics from those logs and publish them under a custom CloudWatch metrics namespace. Which approach meets these requirements?
Choose an answer
Tap an option to check your answer.
Correct answer: Format the log statements using the CloudWatch embedded metric format (EMF) so they produce custom CloudWatch metrics..
Why this is the answer
The correct approach is to format the log statements using the CloudWatch embedded metric format (EMF). EMF allows you to embed custom metrics directly within your CloudWatch Logs events. When Lambda logs these EMF-formatted messages to CloudWatch Logs, CloudWatch automatically extracts the metrics and publishes them to the specified custom namespace, eliminating the need for separate metric creation steps. This is the most efficient and recommended way to create custom metrics from application logs in AWS. Using CloudWatch Logs Insights to generate custom metrics (whether via EMF or JSON parsing) is incorrect because Logs Insights is a query and analysis service, not a mechanism for generating metrics directly from incoming log streams for continuous monitoring. Amazon CloudWatch RUM (Real User Monitoring) is designed for monitoring client-side web application performance, not for processing backend Lambda function logs.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed