AWS Certified DevOps Engineer – ProfessionalMonitoring and LoggingEasy
A global e-commerce company uses AWS Lambda functions for its serverless backend. They need to monitor the performance and errors of these functions, including invocation counts, errors, duration, and throttles, to identify and troubleshoot issues quickly. The solution should provide pre-built dashboards and allow for custom alarms. Which AWS service is best suited for this requirement?
- AAWS CloudTrail
- BAWS X-Ray
- CAmazon CloudWatch
- DAmazon S3
Show answer & explanationAnswer & explanation
Correct answer: C. Amazon CloudWatch
Amazon CloudWatch automatically collects and displays metrics for AWS Lambda functions, including invocation counts, errors, duration, and throttles. It provides pre-built dashboards and allows users to create custom alarms based on these metrics, meeting all the specified requirements for monitoring Lambda performance and errors.
Why the other options are wrong
- A. AWS CloudTrail logs API calls and user activity, not performance metrics of Lambda functions.
- B. AWS X-Ray is used for distributed tracing of requests across multiple services, which is complementary to CloudWatch but does not provide the primary metrics requested.
- D. Amazon S3 is an object storage service and does not provide monitoring capabilities for Lambda functions.
CloudWatch for Lambda
Amazon CloudWatch automatically monitors AWS Lambda functions, collecting key performance metrics and logs.
- Provides invocation count, errors, duration, throttles.
- Offers pre-built dashboards and custom alarms.
- Essential for Lambda function health and performance.
Memory trick: CloudWatch is the Lambda's health monitor.