debugging-lambda-timeouts

Diagnoses AWS Lambda timeout failures by analyzing configuration, CloudWatch logs, metrics, and dependencies.

Updated Jul 1, 2026
One-click install
npx skills add https://github.com/sakicodes/BuildFestHackathon26 --skill debugging-lambda-timeouts-sakicodes
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: debugging-lambda-timeouts
Source: https://github.com/sakicodes/BuildFestHackathon26/tree/main/.agents/skills/debugging-lambda-timeouts
Command: npx skills add https://github.com/sakicodes/BuildFestHackathon26 --skill debugging-lambda-timeouts-sakicodes

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Lambda functions that time out or approach their timeout limit are hard to diagnose because the root cause can hide in configuration, cold starts, VPC networking, memory pressure, or downstream dependencies. This Skill runs a systematic investigation and produces a prioritized debugging report with actionable fixes. ## Core Features & Use Cases - Configuration and Metrics Analysis: Retrieves timeout and memory settings, then correlates Duration, Errors, and InitDuration CloudWatch metrics to spot trends. - CloudWatch Logs Investigation: Runs Logs Insights queries for timeout, error, performance, and memory patterns using timestamps derived from actual log stream data. - Code and Dependency Review: Optionally analyzes provided Lambda code for timeout-prone patterns such as HTTP calls without timeouts, and inspects VPC and external service dependencies. - Use Case: Your Python API handler in us-east-1 intermittently times out. Provide the function name, region, and code, and receive a report identifying unconfigured HTTP request timeouts as the root cause, with prioritized remediation steps. ## Quick Start Debug why my Lambda function my-api-handler in us-east-1 has been timing out over the last 48 hours and give me prioritized recommendations.

Frequently Asked Questions about debugging-lambda-timeouts

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I debug AWS Lambda timeout errors?

Lambda timeout debugging involves checking the function's timeout and memory configuration, analyzing CloudWatch Duration and Errors metrics, and querying logs for timeout patterns. This Skill automates that workflow and produces a report with prioritized recommendations.

How to find Lambda timeout root cause in CloudWatch logs?

Use CloudWatch Logs Insights queries filtering for timeout, error, and duration messages within a time window derived from the log stream's lastEventTimestamp. The Skill runs separate queries for timeouts, errors, performance indicators, and REPORT-line memory usage.

What information do I need to debug a Lambda timeout?

You need the Lambda function name and AWS region as required parameters. Optionally provide a time window in hours (default 1) and the function's code so the analysis can also review code for timeout-prone patterns.

Why does my Lambda function time out in a VPC?

VPC-attached functions can time out due to NAT gateway misconfiguration, restrictive security groups, or subnet routing issues blocking external access. The Skill checks VPC configuration and correlates it with observed timeout patterns in logs and metrics.

Can Lambda cold starts cause timeout errors?

Yes, cold start initialization time (InitDuration) counts toward the function's timeout limit and can push invocations over it. The Skill analyzes InitDuration metrics, checks provisioned concurrency, and correlates cold starts with timeout occurrences.

What AWS permissions are needed for Lambda timeout analysis?

The analysis requires AWS credentials with permissions for Lambda (get-function-configuration), CloudWatch Metrics (get-metric-statistics), and CloudWatch Logs (describe-log-groups, describe-log-streams, start-query, get-query-results) in the target region.