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.

enabling-lambda-vpc-internet-access
Enables internet access for AWS Lambda functions deployed in VPC subnets by creating NAT Gateway infrastructure, configuring public/private subnet routing, and updating security groups. Use when a VPC-attached Lambda function cannot reach the internet.

exploring-data-catalog
Full inventory and audit of AWS Glue Data Catalog, S3 Tables, Redshift-federated, and remote Iceberg catalogs.

exporting-rds-to-s3
Exports Amazon RDS or Aurora database snapshots to Amazon S3 in Apache Parquet format for analytics, backup, or data migration. Handles snapshot selection or creation, IAM role setup, KMS encryption, S3 bucket preparation, export task execution, progress monitoring, and data verification. Use when exporting RDS/Aurora data to S3 for Athena, Glue, or Redshift Spectrum consumption.

finding-data-lake-assets
Resolve data lake asset references across Glue, S3, S3 Tables, and Redshift catalogs.

ingesting-into-data-lake
Ingest data from S3, databases, Snowflake, BigQuery, DynamoDB, or Glue tables into your AWS data lake.

launching-ec2-instance-with-best-practices
Launch EC2 instances with secure, cost-efficient defaults including IAM roles, hardened security groups, and encrypted storage.