debugging-lambda-timeouts
aws/agent-toolkit-for-aws
Systematically debug AWS Lambda timeout failures by analyzing configuration, logs, metrics, and dependencies.
What is debugging-lambda-timeouts?
This skill investigates Lambda function timeout issues by examining function configuration, CloudWatch logs and metrics, VPC/networking, cold start patterns, memory constraints, and downstream dependencies. Use it when a Lambda function is timing out or approaching its timeout limit to identify root causes and get actionable fixes.
- Analyzes Lambda function configuration and timeout settings
- Reviews CloudWatch logs and metrics for performance patterns
- Investigates VPC and networking configuration issues
- Identifies cold start patterns and their impact
- Examines memory constraints and resource allocation
- Analyzes downstream dependencies and external service delays
How to install debugging-lambda-timeouts
npx skills add https://github.com/aws/agent-toolkit-for-aws --skill debugging-lambda-timeouts- AWS credentials configured with permissions for Lambda, CloudWatch Logs, and CloudWatch Metrics
- Access to the target Lambda function and its CloudWatch log groups
- Function name and AWS region
How to use debugging-lambda-timeouts
- 1.Provide the Lambda function name and AWS region
- 2.The skill will collect function configuration details
- 3.Review CloudWatch logs and metrics from recent invocations
- 4.Analyze VPC/networking configuration if applicable
- 5.Examine cold start patterns and memory usage
- 6.Review code for timeout-prone patterns if provided
- 7.Study the structured debugging report with prioritized recommendations
- 8.Implement suggested fixes based on identified root causes
Use cases
- Investigating a Lambda function that consistently times out during execution
- Diagnosing intermittent timeout issues in production workloads
- Analyzing cold start performance impact on timeout behavior
- Troubleshooting database connection timeouts from Lambda
- Identifying external API call delays causing Lambda timeouts
- AWS Lambda developers
- DevOps engineers managing Lambda functions
- Cloud architects optimizing serverless applications
- Backend engineers debugging production Lambda issues
debugging-lambda-timeouts FAQ
The function may not have logs available. Check the function's log group configuration and invocation metrics. You may need to invoke the function to generate new logs for analysis.
AWS credentials must have permissions for Lambda, CloudWatch Logs, and CloudWatch Metrics. Verify your IAM policy includes these services.
If queries fail with time range errors, reduce the analysis window or check log group retention settings.
Common causes include insufficient timeout settings, external service delays, database connection issues, memory constraints, cold starts, and inefficient code patterns.
Full instructions (SKILL.md)
Source of truth, from aws/agent-toolkit-for-aws.
name: debugging-lambda-timeouts description: Debugs AWS Lambda function timeout failures by systematically analyzing function configuration, CloudWatch logs and metrics, VPC/networking, cold starts, memory constraints, and downstream dependencies to identify root causes with actionable fixes. Use when a Lambda function is timing out or approaching its timeout limit. version: 1
Debugging Lambda Timeouts
Overview
Domain expertise for systematically investigating AWS Lambda function timeout failures by analyzing function configuration, CloudWatch logs, metrics, dependencies, cold start patterns, and code. Identifies common causes such as insufficient timeout settings, external service delays, database connection issues, memory constraints, and inefficient code patterns, then provides prioritized recommendations.
Debug a Lambda timeout
To investigate and resolve Lambda timeout issues, follow the procedure exactly. See Lambda timeout debugging procedure.
The procedure collects function configuration, CloudWatch metrics and logs, dependency analysis, and cold start patterns. If Lambda code is provided, it also reviews the code for timeout-prone patterns. Results are compiled into a structured debugging report with prioritized recommendations.
Troubleshooting
Function not found
Verify the function name and region. Use aws lambda list-functions --region <region>
to list available functions.
No logs available
The function may not have been invoked recently or logging may be disabled. Check the function's log group configuration and invocation metrics.
Access denied errors
Verify AWS credentials have permissions for Lambda, CloudWatch Logs, and CloudWatch Metrics. See the full procedure for details.
Log query time range issues
If CloudWatch Logs Insights queries fail with time range errors, reduce the analysis window or check log group retention settings. See the full procedure for details.
Related skills
More from aws/agent-toolkit-for-aws and the wider catalog.

deploying-custom-domain-rest-api
Deploy a Regional REST API with custom domain, Lambda backend, and request authorizer on AWS.

developing-applications-on-managed-service-for-apache-flink
Domain expertise for Apache Flink and Amazon Managed Service for Apache Flink development, deployment, and operations.

diff-scanning-with-aws-security-agent
Scan only changed code since a git ref for fast, focused security findings.

directconnect
Configure AWS Direct Connect for private, consistent network links between data centers and AWS.

dms-schema-conversion
Migrate database schemas between heterogeneous engines using AWS DMS Schema Conversion

enabling-lambda-vpc-internet-access
Enable internet access for Lambda functions in VPC subnets via NAT Gateway infrastructure