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

A company's application has an AWS Lambda function that processes messages from IoT devices. The company wants to monitor the Lambda function to ensure that the Lambda function is meeting its required service level agreement (SLA).

A developer must implement a solution to determine the application's throughput in near real time. The throughput must be based on the number of messages that the Lambda function receives and processes in a given time period. The Lambda function performs initialization and post-processing steps that must not factor into the throughput measurement.

What should the developer do to meet these requirements?

Answer options

Correct answer: C

Explanation

Publishing custom Amazon CloudWatch metrics directly from the application code allows the developer to record data points only during the specific message processing phase, avoiding the inclusion of initialization and post-processing times. Standard metrics like Invocations, Duration, and ConcurrentExecutions are too coarse because they measure the entire execution lifecycle of the Lambda function. Scheduled log processing via EventBridge is not near real-time and introduces unnecessary operational overhead compared to direct metric emission.