How to find slow Lambda executions across all functions?
Short answer
C Enable AWS X-Ray for all the Lambda functions. Configure an X-Ray insight on a new group that includes all the Lambda functions. After the X-Ray insight has finished processing, review the X-Ray logs.
Question
Key Takeaways
This question tests knowledge of distributed tracing with AWS X-Ray versus log analysis with CloudWatch Logs Insights; the key is that X-Ray Insights on a group is purpose-built to surface slow Lambda executions across an entire application.
AWS X-Ray is the recommended service for tracing and identifying slow executions across multiple Lambda functions in a serverless application. CloudWatch Logs Insights can also analyze past executions, but X-Ray provides dedicated performance insights and grouping for distributed tracing.
Common mistake: Many candidates choose CloudWatch Logs Insights (Option A) because it can query historical logs and sort by duration, but it lacks the built-in distributed tracing and grouping capabilities of X-Ray that are specifically designed for this cross-function performance analysis scenario.
Expert Analysis
The correct answer is C. The scenario describes a serverless application with irregular slowness and no failed requests, which is a classic use case for AWS X-Ray. X-Ray provides distributed tracing that captures the end-to-end latency of requests as they flow through API Gateway, Lambda, and downstream services. By enabling X-Ray on all Lambda functions and creating an X-Ray insight on a group that includes all the functions, the developer can automatically surface anomalous latency patterns and identify the specific functions responsible for the slow executions.
Why Option A is less ideal: While Amazon CloudWatch Logs Insights (Option A) can query log groups and sort by execution duration, it requires manual query construction and does not provide the same level of integrated performance anomaly detection as X-Ray Insights. Logs Insights is better suited for ad-hoc log analysis rather than continuous performance monitoring across a distributed system.
Why Options B and D are incorrect: AWS CloudTrail Insights (Option B) is designed to detect unusual activity in API calls, not application performance issues like slow Lambda executions. AWS Glue (Option D) is an ETL service that would be overly complex and not purpose-built for real-time or near-real-time performance monitoring of Lambda functions. Using Glue to transform logs and then visualizing them in CloudWatch dashboards introduces unnecessary complexity and latency.
Official Reference
- https://docs.aws.amazon.com/lambda/latest/operatorguide/general-approach.html
- https://docs.aws.amazon.com/xray/latest/devguide/aws-xray.html
These links open the official vendor documentation in a new tab.
Exam Strategy
When the question mentions 'slow executions across all Lambda functions' in a serverless application with no failures, think distributed tracing first. AWS X-Ray is specifically designed for this scenario, while CloudWatch Logs Insights is better for log-based queries and CloudTrail is for API activity monitoring.
Community Votes
70% of anonymous learners picked answer C. Votes are pick records left by other test-takers — they are not the verified answer.
Discussion 8 contributions
Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.
From public community threads 8
-
monishvster 👍 6 Answered CX-ray will provide better insights for performance
-
KarBiswa 👍 4 Answered Chttps://docs.aws.amazon.com/lambda/latest/operatorguide/general-approach.html#:~:text=Use%20X%2DRay%20to%20find%20all%20the%20services%20involved%20in%20a%20request.%20For%20larger%20serverless%20applications%2C%20this%20is%20the%20fastest%20way%20to%20locate%20all%20of%20the%20interactions%20involved%20in%20the%20request.%20From%20X%2DRay%2C%20isolate%20the%20service%20where%20latency%20or%20errors%20are%20occurring%20then%20drill%20down%20further. It clearly an interaction issues among the services no failure has occurred
-
SerialiDr 👍 2 Answered AA. Perform a query across all the Lambda function log groups by using Amazon CloudWatch Logs Insights. Filter on type of report and sort descending by Lambda function execution duration. Here's why this approach is most efficient: Centralized Logs: CloudWatch Logs Insights allows you to query logs across all your Lambda function log groups in a single location. Targeted Filtering: You can filter the query to focus on specific time periods of high traffic, pinpointing anomalies during those times. Sorting by Duration: By sorting the results descending by execution duration, you can easily identify Lambda functions with the slowest execution times. Fast Insights: CloudWatch Logs Insights offers near real-time analysis, enabling you to quickly identify performance bottlenecks.
-
BrainFried 👍 2 Answered AI think the answer is A The goal is to analysis past executions of the Lambda functions, to isolate and identity the slow Lambda functions. This can be done with option A. Option D does not retroactively analyse past executions of Lambda functions - therefore it's not as effective as option A ~~
-
Abdullah22 👍 2 Answered Cnot sure between A and C but going with C.
Show 3 more comments
-
CrescentShared 👍 2 Answered AHesitate. A or C?
-
65703c1 👍 1 Answered CC is the correct answer.
-
ShakthiGCP 👍 1 Answered CX-Ray for performance
Reader comments & corrections
No reader corrections yet — spotted an error or have a note? Share it below.
Related Analysis
Practice All DVA-C02 Questions
Access 100 questions with complete answers and detailed explanations.
View Full DVA-C02 Practice Test →