OpenParable
Skip to content
← Back to skills

Lambda Performance Troubleshooting

DevOps & Security
lambda-performance-troubleshooting

Lambda Performance Troubleshooting is an Agent Skill for devops & security published in the HolmesGPT/holmesgpt repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

AWS Lambda High Latency Troubleshooting

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/HolmesGPT/holmesgpt/blob/HEAD/tests/llm/fixtures/test_ask_holmes/89_skill_missing_cloudwatch/lambda-performance-troubleshooting/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/lambda-performance-troubleshooting, but wait for my approval before writing files or running scripts.

Copying this prompt does not install or run the skill. Review third-party files before use.

AWS Lambda High Latency Troubleshooting

Overview

This runbook helps diagnose and resolve AWS Lambda function performance issues including high latency, timeouts, and cold starts.

Steps

Step 1: Query Performance Metrics

Use CloudWatch to check Lambda function latency over time:

aws cloudwatch get-metric-statistics --namespace <lambda-namespace> \
  --metric-name Duration --dimensions Name=FunctionName,Value=<function-name> \
  --statistics Average,Maximum --start-time <start-time> \
  --end-time <end-time> --period 300

Step 2: Check Function Logs

Look for errors or slow operations in CloudWatch Logs:

aws logs filter-log-events --log-group-name <lambda-log-group>/<function-name> \
  --filter-pattern "[ERROR] OR [WARN] OR timeout" --limit 100

Step 3: Analyze Cold Start Patterns

Query CloudWatch for cold start frequency:

aws cloudwatch get-metric-statistics --namespace <lambda-namespace> \
  --metric-name InitDuration --dimensions Name=FunctionName,Value=<function-name> \
  --statistics Average,Count --start-time <start-time> \
  --end-time <end-time> --period 300

Step 4: Check Concurrent Executions

Verify Lambda isn't hitting concurrency limits:

aws cloudwatch get-metric-statistics --namespace <lambda-namespace> \
  --metric-name ConcurrentExecutions --dimensions Name=FunctionName,Value=<function-name> \
  --statistics Maximum --start-time <start-time> \
  --end-time <end-time> --period 60

Step 5: Review Memory Utilization

Check if function needs more memory allocation:

aws logs insights start-query --log-group-name <lambda-log-group>/<function-name> \
  --start-time <epoch-start> --end-time <epoch-end> \
  --query-string "fields @timestamp, @message | filter @type = 'REPORT' | stats max(@maxMemoryUsed), avg(@memorySize)"