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

A developer is using an AWS Lambda function to process data. The developer needs to extract custom metrics about processing times from the Lambda logs. The developer needs to analyze the metrics, set alarms, and detect issues in real time.

Which solution will meet these requirements?

Answer options

Correct answer: B

Explanation

Using the CloudWatch embedded metric format (EMF) allows Lambda functions to output custom metrics asynchronously in log files, which CloudWatch then automatically extracts in real time for graphing and alarming. Option A is incorrect because CloudTrail is used for auditing API calls, not for custom performance metrics. Option C is incorrect because CloudWatch Logs Insights is a query tool for log analysis rather than a real-time metric extraction and alarming engine, and Option D introduces unnecessary latency and complexity by routing logs through Kinesis and S3.