How to find slow Lambda executions across all functions?
A company runs an application on AWS. The application consists of a static website that is hosted on Amazon S3. The application includes Amazon API Gateway APIs that invoke AWS Lambda functions. During a period of high traffic on the application, application users reported that the application was slow at irregular intervals. There were no failed requests. A developer needs to find the slow executions across all the Lambda functions. Which solution will meet these requirements?
Community Votes
70% of anonymous learners picked answer C. Votes are pick records left by other test-takers — they are not the verified answer.
Community Insight
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.
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.
Community Discussion (8 comments)
Comments & Corrections
No comments yet — spotted an error or have a note? Share it below.
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
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.
Related Analysis
Practice All DVA-C02 Questions
Access 100 questions with complete answers and detailed explanations.
View Full DVA-C02 Practice Test →