Debugging Lambda Timeouts

作者 aws188af2f810ce无许可证2.8K 个星标收录于 2026年10月8日更新于 2026年10月8日仓库今天更新

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.

仅含说明DevOps & Cloud
AI 生成的概览

通过分析配置、CloudWatch 日志与指标、网络、冷启动和依赖项,诊断 AWS Lambda 超时故障。

功能
指导对 AWS Lambda 函数超时故障进行系统性排查,涵盖函数配置、CloudWatch 日志与指标、VPC 与网络、冷启动、内存限制以及下游依赖。它会将结果整理成结构化调试报告并给出按优先级排序的建议;在提供 Lambda 代码时,还会检查代码中易导致超时的模式。
适用场景
适用于 Lambda 函数发生超时或接近超时限制、且根本原因不明确的情况。适合在应用修复前需要关联配置、日志、指标和依赖行为进行排查的场景。
运行要求
需要具备 Lambda、CloudWatch Logs 和 CloudWatch Metrics 权限的 AWS 凭证,并需要访问 AWS 的网络连接。该技能不附带脚本,仅为说明文档,并包含一份完整流程的参考文档。

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 [blocked].

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.

来源与署名

来源:aws/agent-toolkit-for-aws位于skills/specialized-skills/serverless-skills/debugging-lambda-timeouts提交188af2f

许可证: 无许可证

内容归原作者所有。SourceWeft 从公开仓库中收录这些内容。

举报或申请下架