A developer needs to extract custom processing-time metrics from AWS Lambda logs, analyze them, create alarms, and detect issues in real time. Which approach satisfies these requirements?
Choose an answer
Tap an option to check your answer.
Correct answer: Use Amazon’s open-source client libraries to emit logs in the CloudWatch embedded metric format. Use CloudWatch to build the graphs and alarms for the custom metrics..
Why this is the answer
The correct approach is to use Amazon’s open-source client libraries to emit logs in the CloudWatch embedded metric format. This method allows developers to embed custom metric data directly within their Lambda function logs. CloudWatch automatically extracts these metrics, making them available for graphing, alarming, and analysis without needing additional parsing or processing steps. This is a highly efficient and cost-effective way to collect custom metrics. Sending custom metric data to AWS CloudTrail using PutMetricData is incorrect because CloudTrail is primarily for auditing and governance, not for custom application metrics. CloudWatch Logs Insights is a powerful query tool, but it's for analyzing existing logs, not for creating custom metrics directly from log data in real-time for immediate alarming. Streaming logs to Kinesis and S3 is a valid data pipeline, but it introduces unnecessary complexity and latency for real-time metric extraction and alarming compared to the embedded metric format.
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