[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7A9R3JVR2GSNYK8AR95FA1M":3,"skill-same:01M7A9R3JVR2GSNYK8AR95FA1M":149},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":45,"commitSha":46,"skillDirectory":47,"forksCount":48,"repositoryHtmlUrl":49,"repositoryHomepageUrl":6,"ownerHtmlUrl":50,"ownerBlogUrl":6,"ownerDescription":51,"updatedAt":52,"install":53,"resources":66},"01M7A9R3JVR2GSNYK8AR95FA1M","lambda-invocation-troubleshooter",null,"Diagnoses AWS Lambda invocation failures through an eight-category diagnostic tree: TaskTimeoutException (timeout config vs slow downstream), Runtime.ExitError out-of-memory (MaxMemoryUsed vs MemorySize; CPU scales with memory), cold-start init latency (SnapStart, provisioned concurrency), AccessDenied from execution role (CloudTrail, simulate-principal-policy), VPC connectivity (NAT Gateway, VPC endpoint, SG), environment variable KMS decrypt errors and unset variables, invocation-type mismatch (sync caller timeout vs async retry \u002F DLQ \u002F destination), and ECR container image pull errors (image URI, repo policy, size). Walks symptoms to a verified root cause with evidence-backed probes; emits ROOT_CAUSE_FOUND, NEED_MORE_INFO, or ESCALATE.","jhkchan\u002Faws-agent-skills","jhkchan","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F1083902?v=4","01M7A2SVQYP9GQTPTDXP5JKYQ4","Jacky Chan","01M7A2SVS117YWCTZABB75HZR1",4,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Flambda-invocation-troubleshooter\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: lambda-invocation-troubleshooter\ndescription: 'Diagnoses AWS Lambda invocation failures through an eight-category diagnostic tree: TaskTimeoutException (timeout config vs slow downstream), Runtime.ExitError out-of-memory (MaxMemoryUsed vs MemorySize; CPU scales with memory), cold-start init latency (SnapStart, provisioned concurrency), AccessDenied from execution role (CloudTrail, simulate-principal-policy), VPC connectivity (NAT Gateway, VPC endpoint, SG), environment variable KMS decrypt errors and unset variables, invocation-type mismatch (sync caller timeout vs async retry \u002F DLQ \u002F destination), and ECR container image pull errors (image URI, repo policy, size). Walks symptoms to a verified root cause with evidence-backed probes; emits ROOT_CAUSE_FOUND, NEED_MORE_INFO, or ESCALATE.'\nlicense: Apache-2.0\ncompatibility: Agent runtime that reads SKILL.md (Claude Code, Cursor, Windsurf, Codex, Gemini). Offline symptom classification works from pasted error messages and function configuration. Live-account diagnosis uses aws lambda get-function-configuration, aws logs get-log-events \u002F filter- log-events, aws lambda get-policy, aws ec2 describe-security-groups, aws lambda get-event-source-mapping, aws lambda get-function-url, aws kms describe-key, aws ecr describe-repositories \u002F get-repository-policy, aws...\nmetadata:\n  domain: aws-cloudops\n  complexity: high\n  requires_llm: 'true'\n  phase: '2'\n  supports_pipeline: 'true'\n  entry_point: 'false'\n  family: Compute\n  task_type: troubleshoot\n  skill_class: capability\n  lifecycle_status: active\n  verdict_shape: ROOT_CAUSE_FOUND | NEED_MORE_INFO | ESCALATE\n  when_to_use: Diagnosing a Lambda function invocation failure (timeout, OOM, AccessDenied, cold-start latency, network error, env var decrypt error, async retry storm, container image pull failure), walking a symptom to the failed layer with verify and fix commands, validating why an application's invocation returns an error, or triaging a \"the Lambda is broken\" page where the root cause may be config, execution role, network, runtime, or container registry — not necessarily the function code itself.\n  when_not_to_use: Code-level debugging of the function handler (use the application logs and a debugger), CloudFront\u002FLambda@Edge origin issues (use the CloudFront distribution logs), Step Functions orchestration debugging (use the Step Functions execution history), IAM policy authoring for the execution role (use iam-least-privilege-advisor), or VPC route table \u002F NACL posture audits (use ec2-security-group-auditor). This skill diagnoses invocation-time failures; it does not tune handler code or audit steady-state configuration posture.\n  activation_triggers: Lambda TaskTimeoutException, Task timed out, Lambda out of memory, Runtime.ExitError, Lambda cold start, init duration, Lambda AccessDenied, execution role denied, Lambda cannot reach internet, Lambda cannot reach S3, Lambda VPC timeout, Lambda environment variable KMS, Lambda decrypt error, Lambda async retry storm, EventSourceMapping retry, Lambda container image pull, ECR image pull error, Lambda Provisioned concurrency, troubleshoot Lambda invocation\n  invocation_schema: 'Input: either (a) a symptom description (error message, observed behaviour, \"function returns 502\", \"async invocations are retried forever\"), optionally paired with the function configuration (get-function-configuration output) and recent CloudWatch logs, OR (b) a FunctionName plus caller context (invocation type, source ARN, observed error) for live-account diagnosis. Output: a deterministic TARGET\u002FVERDICT\u002FREASON\u002FLAYER\u002FEVIDENCE\u002FREMEDIATION block where VERDICT ∈ {ROOT_CAUSE_FOUND, NEED_MORE_INFO, ESCALATE} and LAYER ∈ {TIMEOUT_CONFIG, TIMEOUT_DOWNSTREAM, MEMORY_CONFIG, COLD_START, PERMISSION_EXECUTION_ROLE, PERMISSION_RESOURCE_POLICY, VPC_CONNECTIVITY, VPC_ENDPOINT, ENV_VAR_KMS, ENV_VAR_MISSING, INVOCATION_ASYNC, INVOCATION_SYNC, ECR_IMAGE, ECR_POLICY, RUNTIME_UNSUPPORTED, UNKNOWN}.'\n  invocation_example: \"# Minimal valid input (offline symptom classification):\\nSymptom: \\\"Lambda function fn-prod-processor was invoked 200 times\\nin the last hour; 30 returned TaskTimeoutException after 30s; the\\nrest succeeded.\\\"\\nFunctionName: fn-prod-processor\\nRuntime: nodejs20.x\\nTimeout: 30\\nMemorySize: 256\\nHandler: index.handler\\nLastLogEvents: 1 timeout at \\\"await dynamodb.put(...).promise()\\\"\\n  followed by \\\"Task timed out after 30.00 seconds\\\"\\nInvocation type: RequestResponse (sync), called from API Gateway\"\n  version: 0.1.0\n  author: Jacky Chan — AWS Community Builder\n  keywords: Lambda, TaskTimeoutException, Runtime.ExitError, out of memory, cold start, init duration, SnapStart, provisioned concurrency, AccessDenied, execution role, simulate-principal-policy, VPC, NAT Gateway, VPC endpoint, environment variable, KMS decrypt, invocation type, EventSourceMapping, DLQ, destination, container image, ECR, image pull, troubleshooting\n  tags: lambda, compute, troubleshooting, invocation, timeout, oom, cold-start, iam-role, vpc, kms, ecr\n---\n\n# Lambda Invocation Troubleshooter\n\n## Quick start\n\n\nMoved verbatim to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md) — load on demand.\n\n\n## Mindset\n\n\nMoved verbatim to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md) — load on demand.\n\n\n## Philosophy\n\nMoved verbatim to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md) — load on demand.\n\n## Quick reference — symptom triage table\n\n| Symptom phrase \u002F error | Most likely layer | First probe |\n|---|---|---|\n| `Task timed out after X seconds`, `TaskTimeoutException` | TIMEOUT_CONFIG \u002F TIMEOUT_DOWNSTREAM | `get-function-configuration` (Timeout), CloudWatch Duration vs Timeout, log the last line before kill |\n| `Runtime.ExitError`, `ErrorType: OutOfMemory`, `MemorySize` exceeded | MEMORY_CONFIG | CloudWatch `MaxMemoryUsed` vs `MemorySize` |\n| First-invocation p99 latency spike; init duration > 1s | COLD_START | CloudWatch `InitDuration`, SnapStart \u002F ProvisionedConcurrency config |\n| `AccessDenied`, `is not authorized to perform`, `User: arn:... is not authorized` | PERMISSION_EXECUTION_ROLE | `cloudtrail lookup-events` for the denied API; `iam simulate-principal-policy` on the execution role |\n| `Resource: ... is not authorized`, cross-account caller denied | PERMISSION_RESOURCE_POLICY | `lambda get-policy` (resource-based) |\n| `connect ETIMEDOUT`, `ECONNREFUSED`, function cannot reach external host | VPC_CONNECTIVITY \u002F VPC_ENDPOINT | `get-function-configuration` (VpcConfig), `describe-route-tables` for the subnet |\n| `Could not decrypt KMS`, `KMS.AccessDeniedException`, decrypt error on env var | ENV_VAR_KMS | `get-function-configuration` (KMSKeyArn), `kms describe-key`, execution role `kms:Decrypt` check |\n| `ReferenceError: X is not defined`, \"environment variable is missing\" | ENV_VAR_MISSING | `get-function-configuration` (Environment.Variables) |\n| Async invocation: caller sees 202 but downstream state never updates;DLQ fills | INVOCATION_ASYNC | `get-event-source-mapping`, DLQ \u002F destination config, `Errors` metric |\n| Sync (API Gateway → Lambda) returns 504 \u002F 502 after X seconds | INVOCATION_SYNC | Caller (API Gateway) timeout vs Lambda Timeout |\n| `ImagePullFailure`, `ECR image ... not found`, container Lambda fails to initialise | ECR_IMAGE \u002F ECR_POLICY | `get-function-configuration` (PackageType: Image, Code.ImageUri), `ecr describe-images`, `ecr get-repository-policy` |\n| None of the above, weird runtime error, region-wide event | ESCALATE | `aws health describe-events` + AWS Service Health Dashboard |\n\n## Pre-flight: function state and gather-info gate\n\nBefore running symptom-specific probes, gather the canonical function\nconfiguration and short-circuit on function states that mimic invocation\nfailures. Misclassifying these produces hours of timeout debugging for a\nproblem that is not a timeout problem.\n\n### Account-wide pre-flight commands\n\nMoved verbatim to [references\u002Fdiagnostic-commands.md](references\u002Fdiagnostic-commands.md) — load on demand.\n\n\n\nMoved verbatim to [references\u002Fdiagnostic-commands.md](references\u002Fdiagnostic-commands.md) — load on demand.\n\n\n\nMoved verbatim to [references\u002Fworked-examples.md](references\u002Fworked-examples.md) — load on demand.\n\n\n## Process — Diagnostic decision tree (apply in symptom order)\n\nThe diagnostic tree is symptom-driven. Pick the entry point based on the\nobserved symptom, then walk the layer-specific probes in order. Each layer\nends with either a positive root-cause confirmation (failing probe that\nmatches the symptom) or a pass that moves to the next layer. **Never emit\nROOT_CAUSE_FOUND without a failing probe that matches the symptom.**\n\n### Step 0: Non-obvious behaviours that change diagnosis\n\nMoved verbatim to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md) — load on demand.\n\n### Step 1: Symptom entry — pick the diagnostic branch\n\nMap the symptom to a branch and jump to that branch's section. If the\nsymptom matches none of the eight categories, route to Step 9 (ESCALATE\nor NEED_MORE_INFO).\n\n| Symptom | Branch |\n|---|---|\n| `Task timed out after X seconds` (sync or async); CloudWatch shows Duration == Timeout | Step 2 — Timeout |\n| `Runtime.ExitError` \u002F `ErrorType: OutOfMemory` \u002F \"MemorySize exceeded\" | Step 3 — OOM |\n| First invocation(s) of an execution environment slow; `InitDuration` > 1s | Step 4 — Cold start |\n| `AccessDenied`, `is not authorized`, \"execution role denied\" | Step 5 — Permissions |\n| `connect ETIMEDOUT`, `ECONNREFUSED`, \"cannot reach S3\u002Finternet\u002FDB\" | Step 6 — VPC connectivity |\n| `Could not decrypt KMS`, `decrypt error`, `ReferenceError: X is not defined` | Step 7 — Environment variables |\n| Async invocations retried forever \u002F DLQ fills; sync caller returns 5xx after X seconds | Step 8 — Invocation type |\n| `ImagePullFailure`, container Lambda fails to initialise | Step 8b — Container image |\n| None of the above | Step 9 — Escalate \u002F NEED_MORE_INFO |\n\n### Step 2: TaskTimeoutException — timeout diagnostic tree\n\nSymptom: the Lambda service killed the function at the configured\ntimeout. CloudWatch invocation record shows `Duration` approximately\nequal to `Timeout`. The last log line before the kill is the best\nevidence of where time was spent.\n\nMoved verbatim to [references\u002Fdiagnostic-commands.md](references\u002Fdiagnostic-commands.md) — load on demand.\n\n**Verdicts:**\n- Timeout too low for normal operation: ROOT_CAUSE_FOUND,\n  `LAYER: TIMEOUT_CONFIG`. Fix: raise the timeout (1-900 seconds).\n- Downstream genuinely slow: ROOT_CAUSE_FOUND,\n  `LAYER: TIMEOUT_DOWNSTREAM`. Fix: address the downstream (DB\n  capacity, dependency error rate, VPC endpoint).\n- CPU-bound (raising memory fixes it): ROOT_CAUSE_FOUND,\n  `LAYER: MEMORY_CONFIG`. Fix: raise memory.\n\n### Step 3: Out-of-memory — Runtime.ExitError\n\nSymptom: CloudWatch invocation record shows `MemorySize` exceeded.\nLogs contain `Runtime.ExitError`, `ErrorType: OutOfMemory`, or \"FATAL\nERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of\nmemory\" (Node).\n\nMoved verbatim to [references\u002Fdiagnostic-commands.md](references\u002Fdiagnostic-commands.md) — load on demand.\n\n**Verdict:** ROOT_CAUSE_FOUND, `LAYER: MEMORY_CONFIG`. Fix: raise\nmemory to a value with ≥20% headroom over observed `MaxMemoryUsed`.\n\n### Step 4: Cold start — high init duration\n\nSymptom: p99 latency on the first invocation of each new execution\nenvironment is elevated; subsequent invocations on the same environment\nare fast. CloudWatch invocation logs show `Init Duration` > 1 second\n(Node\u002FPython) or > 5 seconds (Java\u002F.NET).\n\nMoved verbatim to [references\u002Fdiagnostic-commands.md](references\u002Fdiagnostic-commands.md) — load on demand.\n\n**Verdict:**\n- Cold start is the cost, no mitigation configured, function is sync \u002F\n  latency-sensitive: ROOT_CAUSE_FOUND, `LAYER: COLD_START`. Fix: enable\n  SnapStart (Java) or provisioned concurrency (any runtime).\n- Cold start is the cost, mitigation IS configured but qualifier is\n  wrong (e.g., provisioned concurrency on $LATEST while traffic goes to\n  a version): ROOT_CAUSE_FOUND, `LAYER: COLD_START`. Fix: align the\n  provisioned concurrency with the invoked qualifier.\n\n### Step 5: AccessDenied — execution role and resource policy\n\nSymptom: function logs show an AWS SDK call returned AccessDenied.\nCommon strings: `AccessDenied`, `User: arn:aws:sts::... is not\nauthorized to perform: \u003Cservice>:\u003Caction>`, `Client.UnauthorizedOperation`,\n`KMS.AccessDeniedException`.\n\nMoved verbatim to [references\u002Fdiagnostic-commands.md](references\u002Fdiagnostic-commands.md) — load on demand.\n\n### Step 6: VPC connectivity — function cannot reach network target\n\nSymptom: function logs show `connect ETIMEDOUT`, `ECONNREFUSED`,\n`ENOTFOUND`, or \"cannot reach X\" for any external host or AWS service.\n\nMoved verbatim to [references\u002Fdiagnostic-commands.md](references\u002Fdiagnostic-commands.md) — load on demand.\n\n\n**Verdicts:**\n- Function in public subnet (route to IGW, no NAT): ROOT_CAUSE_FOUND,\n  `LAYER: VPC_CONNECTIVITY`. Fix: move to a private subnet with a NAT\n  Gateway route.\n- Function in private subnet but no NAT and no VPC endpoint:\n  ROOT_CAUSE_FOUND, `LAYER: VPC_CONNECTIVITY`. Fix: add a NAT Gateway\n  OR add a VPC endpoint.\n- VPC endpoint policy denies the action: ROOT_CAUSE_FOUND,\n  `LAYER: VPC_ENDPOINT`. Fix: scope the endpoint policy to allow the\n  action.\n\n### Step 7: Environment variable — KMS and missing variables\n\nSymptom: function fails to start, or fails at the line that reads\n`process.env.X`. Common strings: `Could not decrypt KMS`, `KMS.AccessDeniedException`,\n`decrypt error`, `ReferenceError: X is not defined`.\n\nMoved verbatim to [references\u002Fdiagnostic-commands.md](references\u002Fdiagnostic-commands.md) — load on demand.\n\n\n### Step 8: Invocation type mismatch — async vs sync\n\n#### 8a: Async retry storm\n\nSymptom: caller receives 202 immediately, but downstream state never\nupdates. CloudWatch `Errors` metric spikes; DLQ (if any) fills.\n\nMoved verbatim to [references\u002Fdiagnostic-commands.md](references\u002Fdiagnostic-commands.md) — load on demand.\n\n\n#### 8b: Sync caller timeout (API Gateway → Lambda)\n\nSymptom: API Gateway returns 504 Gateway Timeout or 502 Bad Gateway.\nLambda function completes within its timeout, but the caller has already\ngiven up.\n\nMoved verbatim to [references\u002Fdiagnostic-commands.md](references\u002Fdiagnostic-commands.md) — load on demand.\n\nCommon patterns:\n\n| Pattern | Cause |\n|---|---|\n| Lambda Timeout = 60s, API Gateway returns 504 at 30s | Caller (API Gateway) gives up before Lambda does. Lower Lambda Timeout to ≤ 29s, or redesign as async. |\n| Lambda Duration p99 = 5s but occasional 504s | API Gateway integration timeout or downstream of API Gateway (ALB, CloudFront) timing out. |\n| Lambda returns 502 (internal lambda error) | Function throws an unhandled exception; the error response shape does not match API Gateway's expected format. |\n\n**Verdict:** ROOT_CAUSE_FOUND, `LAYER: INVOCATION_SYNC`. Fix: align\ntimeouts (Lambda Timeout ≤ API Gateway's cap), or move the workload\nto async if the operation legitimately exceeds 29s.\n\n### Step 8b: Container image — ECR pull failures\n\nSymptom: function fails to initialise. Logs show `ImagePullFailure`,\n`ECR image ... not found`, `ImagePullBackOff`, or\n`Runtime.ExitError`.\n\nMoved verbatim to [references\u002Fdiagnostic-commands.md](references\u002Fdiagnostic-commands.md) — load on demand.\n\n### Step 9: Escalate or NEED_MORE_INFO\n\nIf none of the above produced a positive root-cause match, OR the symptom\nclearly indicates an AWS-side incident (region event, ECR outage, KMS\noutage, runtime deprecation forcing shutdown), emit one of:\n\n- **ESCALATE** — AWS-side incident. Surface the AWS Health event ARN,\n  the function's State and LastUpdateStatus, and the relevant\n  CloudTrail error. Recommend opening a Support case. Do NOT continue\n  diagnosing; the cause is outside the customer's control.\n- **NEED_MORE_INFO** — A specific probe requires operator input. List\n  the missing pieces (qualifier \u002F alias, invocation type, caller\n  context, recent deploy timestamps) and the next probe to run once the\n  info is available.\n\n## Output format\n\n```text\nTARGET: \u003Cfunction-name with qualifier>\nVERDICT: ROOT_CAUSE_FOUND | NEED_MORE_INFO | ESCALATE\nREASON: \u003C1-2 sentences naming the failed layer and the failing probe>\nLAYER: \u003CTIMEOUT_CONFIG | TIMEOUT_DOWNSTREAM | MEMORY_CONFIG |\n        COLD_START | PERMISSION_EXECUTION_ROLE |\n        PERMISSION_RESOURCE_POLICY | VPC_CONNECTIVITY | VPC_ENDPOINT |\n        ENV_VAR_KMS | ENV_VAR_MISSING | INVOCATION_ASYNC |\n        INVOCATION_SYNC | ECR_IMAGE | ECR_POLICY |\n        RUNTIME_UNSUPPORTED | UNKNOWN>\nEVIDENCE:\n  - \u003Cobserved symptom — error string or behaviour>\n  - \u003Cfailing probe — command and its output that confirms the cause>\n  - \u003Cpassing probes — layers ruled out>\nREMEDIATION:\n  1. \u003Cspecific action with CLI command>\n  2. \u003Cverification command after the fix>\nCONFIRM: Before executing any state-changing CLI, emit and await operator\n  approval: \"CONFIRM: About to \u003Caction> on \u003Cname> in \u003Cregion>. Proceed?\n  (yes\u002Fno)\"\n```\n\n### Worked example — TaskTimeoutException, downstream DB slow\n\n```text\nTARGET: fn-prod-processor (alias: prod, version 42)\nVERDICT: ROOT_CAUSE_FOUND\nREASON: Function's Timeout is 30s; CloudWatch Duration p99 is 28.5s and\n  Maximum is 30s (function is killed at the cap). The last log line\n  before each kill is \"await dynamodb.put(...)\" — the DynamoDB PutItem\n  is the slow operation. The table's WriteCapacityUnits is set to 100\n  on a provisioned table sustaining 5000 WCU of demand; requests are\n  being throttled (Step 2b\u002F2c).\nLAYER: TIMEOUT_DOWNSTREAM\nEVIDENCE:\n  - Symptom: 30% of invocations return TaskTimeoutException after\n    exactly 30.00 seconds; the remaining 70% succeed in 1-3s.\n  - Probe: aws logs filter-log-events returns \"Task timed out after\n    30.00 seconds\" 47 times in the last hour; the preceding log line\n    in every case is \"Putting item to orders-table\".\n  - Probe: aws cloudwatch get-metric-statistics on\n    aws\u002Fdynamodb WriteThrottleEvents for orders-table shows sustained\n    throttling in the same hour.\n  - Passing: function Memory is 512 MB; MemoryUtilization Maximum is\n    65% (memory is not the issue); function is not VPC-attached\n    (network is not the issue); function role has dynamodb:PutItem\n    on the table (permissions are not the issue).\nREMEDIATION:\n  1. Switch the table to on-demand (pay-per-request) billing mode to\n     absorb the burst, OR raise WriteCapacityUnits to match observed\n     demand:\n     aws dynamodb update-table --table-name orders-table \\\n       --billing-mode PAY_PER_REQUEST --profile \u003Cp>\n  2. Optionally raise the Lambda Timeout to 60s as defence-in-depth\n     against transient spikes:\n     aws lambda update-function-configuration --function-name \\\n       fn-prod-processor --timeout 60 --profile \u003Cp>\n  3. Verify by re-invoking and watching CloudWatch Duration over the\n     next 30 minutes.\nCONFIRM: Before updating the table or function, emit and await:\n  \"CONFIRM: About to switch orders-table to PAY_PER_REQUEST and raise\n   fn-prod-processor Timeout to 60s. Proceed? (yes\u002Fno)\"\n```\n\n### Worked example — OutOfMemory, memory raised\n\nMoved verbatim to [references\u002Fworked-examples.md](references\u002Fworked-examples.md) — load on demand.\n\n### Worked example — ESCALATE, regional Lambda incident\n\nMoved verbatim to [references\u002Fworked-examples.md](references\u002Fworked-examples.md) — load on demand.\n\n## Anti-Patterns — NEVER\n\n- NEVER declare ROOT_CAUSE_FOUND without a failing probe that matches\n  the symptom. A \"process of elimination\" diagnosis erodes operator\n  trust when the real cause is elsewhere.\n\n- NEVER recommend raising the timeout without checking memory first.\n  Lambda CPU scales with memory; many timeouts are CPU-bound and\n  resolve with a memory increase. Raising the timeout alone pays for\n  longer wall-clock without addressing the bottleneck.\n\n- NEVER place a Lambda function in a public subnet for internet\n  access. Lambda functions in public subnets have no internet because\n  they receive no public IP. Always use a private subnet with a NAT\n  Gateway route, or no VPC attachment at all.\n\n- NEVER assume VPC-attached Lambda functions can reach AWS services\n  without configuration. S3 and DynamoDB have free Gateway endpoints;\n  most other services require Interface endpoints (paid) or a NAT\n  Gateway. A function that \"could reach DynamoDB yesterday but not\n  today\" often had the Gateway endpoint deleted or a route changed.\n\n- NEVER add `kms:Decrypt` for the default `aws\u002Flambda` key. The\n  service-managed key decrypts transparently; permission is not\n  required. Adding it is harmless but indicates the diagnosis went\n  down the wrong path. Only customer-managed CMKs require\n  `kms:Decrypt`.\n\n- NEVER assume the function's `$LATEST` configuration matches the\n  alias a caller invoked. Aliases pin to versions; the version's\n  config can differ from `$LATEST`. Always read config with the\n  qualifier the caller used.\n\n- NEVER enable SnapStart on a non-Java function. SnapStart is Java-only\n  on supported managed runtimes (Corretto 11+). Python and Node have\n  fast init already; SnapStart is a no-op or fails silently.\n\n- NEVER conclude \"Lambda is slow\" without separating `InitDuration`\n  from `Duration`. A function with 4500 ms InitDuration and 50 ms\n  Duration has 50 ms application latency; the 4500 ms is one-time per\n  execution environment. Reporting the sum overstates latency.\n\n- NEVER treat async invocation failures as caller-side errors. The\n  caller received 202 and moved on; the retries are entirely\n  server-side. Without a DLQ or OnFailure destination, failed events\n  vanish. Always check `DeadLetterConfig` and `DestinationConfig`.\n\n- NEVER delete an ECR image tag that a Lambda function references.\n  Lambda caches the image digest at function-update time and continues\n  to use the cached digest, but the next function update or cold start\n  on a fresh execution environment fails to pull. Tag immutability on\n  the ECR repo prevents this footgun.\n\n- NEVER cross-account-invoke a Lambda function without configuring\n  BOTH sides. The caller's identity-based `lambda:InvokeFunction` AND\n  the function's resource-based policy must both allow. Adding only\n  one side produces AccessDenied.\n\n- NEVER recommend a container image > 1 GB without flagging the\n  cold-start impact. Each cold start pays the pull cost; a 5 GB image\n  adds 30-60 seconds of init duration on every fresh execution\n  environment.\n\n- NEVER declare the function failed because `LastUpdateStatus:\n  Failed` without reading `LastUpdateStatusReason`. The reason field\n  names the actual failure (often a role permission, invalid layer\n  ARN, or unreachable ECR image) — the function still runs the prior\n  revision and the symptom is the failed update, not a runtime\n  failure.\n\n- NEVER conflate EventSourceMapping retry semantics with async invoke\n  retry semantics. SQS\u002FKafka\u002FDynamoDB Streams sources have\n  batch-level retries (`MaximumRetryAttempts`); async invokes have\n  event-level retries (immediate, +1m, +2m). The diagnostic and\n  remediation differ.\n\n- NEVER assume a function without a VPC has no network path issues.\n  Internet-bound calls go through the Lambda-managed network; rare\n  service events can degrade this path. Always check AWS Health if\n  multiple functions fail simultaneously with no config change.\n\n## Pre-flight safety checks (run before any state-changing CLI)\n\n- **MANDATORY CONFIRMATION GATE.** Before any state-changing operation\n  (`update-function-configuration`, `publish-version`, `update-alias`,\n  `create-event-source-mapping`, `put-repository-policy`), emit and\n  await operator approval. Do NOT execute the CLI until the operator\n  confirms.\n\n- **Read-only first.** Every probe in the diagnostic tree is\n  read-only (`get-function-configuration`, `filter-log-events`,\n  `get-policy`, `describe-*`, `simulate-principal-policy`,\n  `lookup-events`). Do not perform state-changing operations as\n  diagnostic probes.\n\n- **`update-function-configuration --memory-size`** is safe and\n  non-disruptive for memory-only changes; the function continues\n  serving traffic from the prior revision until the update completes.\n\n- **`update-function-configuration --timeout`** is safe; raising the\n  timeout does not cause disruption. Lowering it can cause new\n  failures if invocations legitimately need the prior value.\n\n- **Publishing a version** is non-disruptive; the new version is\n  addressable but does not receive traffic until an alias is shifted.\n\n- **Shifting an alias** is the user-visible cutover. Always confirm\n  before `update-alias --function-version`. Use weighted alias\n  routing for canary deploys.\n\n- **Enabling SnapStart** requires a new version publish and can only\n  be set on a function that is NOT currently SnapStart-enabled.\n  Existing versions do not retroactively benefit; only new invocations\n  of a freshly-published SnapStart-enabled version see the speedup.\n\n- **Provisioned concurrency** is billed per-second. Enabling on a\n  high-traffic alias is expensive; start with a small allocation\n  (e.g., 5) and scale based on spillover metrics.\n\n- **VPC attachment change** triggers an ENI creation in the target\n  subnets; for high-throughput functions this can take 30-60 seconds\n  to propagate. Plan the change outside a traffic peak.\n\n- **ECR repo policy changes** affect every consumer of the repo;\n  tighten policy gradually, never deny-by-default without confirming\n  no Lambda function depends on the repo.\n\n- **Bulk remediation batch limit.** If the diagnosis identifies the\n  same root cause across multiple functions (e.g., a missing\n  `kms:Decrypt` after a key rotation), batch remediation into groups\n  of at most 5 functions, emit a single CONFIRM per batch, and verify\n  between batches.\n\n## Remediation guidance\n\nMoved verbatim to [references\u002Ferror-handling.md](references\u002Ferror-handling.md) — load on demand.\n\n## Deep reference: Lambda invocation layer model\n\nMoved verbatim to [references\u002Finvocation-layer-reference.md](references\u002Finvocation-layer-reference.md) — load on demand.\n\n## Recent AWS features (2024-2026)\n\nMoved verbatim to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md) — load on demand.\n\n\n## References (load on demand)\n\n- [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md) — quick-start rules, mindset, philosophy, Step-0 non-obvious behaviours, recent AWS features\n- [references\u002Fdiagnostic-commands.md](references\u002Fdiagnostic-commands.md) — account-wide pre-flight CLI, function-state \u002F alias gates, per-step probe commands (Steps 2-8b)\n- [references\u002Ferror-handling.md](references\u002Ferror-handling.md) — per-layer remediation guidance with CLI\n- [references\u002Fworked-examples.md](references\u002Fworked-examples.md) — malformed-input NEED_MORE_INFO template, OutOfMemory and ESCALATE worked examples\n- [references\u002Finvocation-layer-reference.md](references\u002Finvocation-layer-reference.md) — layer model deep reference: decision matrix, memory-to-CPU, retry timelines, ENI lifecycle\n\n## Domain\n\nAWS CloudOps \u002F Lambda Serverless Compute, Invocation Diagnostics,\nExecution Role, VPC Networking, and Container Image Distribution.\n\n## AWS documentation\n\n- **AWS Lambda Developer Guide — Configuring Lambda function options** — https:\u002F\u002Fdocs.aws.amazon.com\u002Flambda\u002Flatest\u002Fdg\u002Fconfiguration-function-common.html\n- **Lambda execution environment and runtime** — https:\u002F\u002Fdocs.aws.amazon.com\u002Flambda\u002Flatest\u002Fdg\u002Fruntimes-context.html\n- **Lambda SnapStart** — https:\u002F\u002Fdocs.aws.amazon.com\u002Flambda\u002Flatest\u002Fdg\u002Fsnapstart.html\n- **Provisioned concurrency** — https:\u002F\u002Fdocs.aws.amazon.com\u002Flambda\u002Flatest\u002Fdg\u002Fprovisioned-concurrency.html\n- **Lambda function VPC configuration** — https:\u002F\u002Fdocs.aws.amazon.com\u002Flambda\u002Flatest\u002Fdg\u002Fconfiguration-vpc.html\n- **Lambda environment variables** — https:\u002F\u002Fdocs.aws.amazon.com\u002Flambda\u002Flatest\u002Fdg\u002Fconfiguration-envvars.html\n- **Asynchronous invocation** — https:\u002F\u002Fdocs.aws.amazon.com\u002Flambda\u002Flatest\u002Fdg\u002Finvocation-async.html\n- **Lambda container images** — https:\u002F\u002Fdocs.aws.amazon.com\u002Flambda\u002Flatest\u002Fdg\u002Flambda-images.html\n- **Lambda IAM execution role** — https:\u002F\u002Fdocs.aws.amazon.com\u002Flambda\u002Flatest\u002Fdg\u002Flambda-intro-execution-role.html\n- **AWS Health** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fhealth\u002Flatest\u002Fug\u002F\n","# Lambda Invocation Troubleshooter\n\n## Quick start\n\n\nMoved verbatim to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md) — load on demand.\n\n\n## Mindset\n\n\nMoved verbatim to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md) — load on demand.\n\n\n## Philosophy\n\nMoved verbatim to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md) — load on demand.\n\n## Quick reference — symptom triage table\n\n| Symptom phrase \u002F error | Most likely layer | First probe |\n|---|---|---|\n| `Task timed out after X seconds`, `TaskTimeoutException` | TIMEOUT_CONFIG \u002F TIMEOUT_DOWNSTREAM | `get-function-configuration` (Timeout), CloudWatch Duration vs Timeout, log the last line before kill |\n| `Runtime.ExitError`, `ErrorType: OutOfMemory`, `MemorySize` exceeded | MEMORY_CONFIG | CloudWatch `MaxMemoryUsed` vs `MemorySize` |\n| First-invocation p99 latency spike; init duration > 1s | COLD_START | CloudWatch `InitDuration`, SnapStart \u002F ProvisionedConcurrency config |\n| `AccessDenied`, `is not authorized to perform`, `User: arn:... is not authorized` | PERMISSION_EXECUTION_ROLE | `cloudtrail lookup-events` for the denied API; `iam simulate-principal-policy` on the execution role |\n| `Resource: ... is not authorized`, cross-account caller denied | PERMISSION_RESOURCE_POLICY | `lambda get-policy` (resource-based) |\n| `connect ETIMEDOUT`, `ECONNREFUSED`, function cannot reach external host | VPC_CONNECTIVITY \u002F VPC_ENDPOINT | `get-function-configuration` (VpcConfig), `describe-route-tables` for the subnet |\n| `Could not decrypt KMS`, `KMS.AccessDeniedException`, decrypt error on env var | ENV_VAR_KMS | `get-function-configuration` (KMSKeyArn), `kms describe-key`, execution role `kms:Decrypt` check |\n| `ReferenceError: X is not defined`, \"environment variable is missing\" | ENV_VAR_MISSING | `get-function-configuration` (Environment.Variables) |\n| Async invocation: caller sees 202 but downstream state never updates;DLQ fills | INVOCATION_ASYNC | `get-event-source-mapping`, DLQ \u002F destination config, `Errors` metric |\n| Sync (API Gateway → Lambda) returns 504 \u002F 502 after X seconds | INVOCATION_SYNC | Caller (API Gateway) timeout vs Lambda Timeout |\n| `ImagePullFailure`, `ECR image ... not found`, container Lambda fails to initialise | ECR_IMAGE \u002F ECR_POLICY | `get-function-configuration` (PackageType: Image, Code.ImageUri), `ecr describe-images`, `ecr get-repository-policy` |\n| None of the above, weird runtime error, region-wide event | ESCALATE | `aws health describe-events` + AWS Service Health Dashboard |\n\n## Pre-flight: function state and gather-info gate\n\nBefore running symptom-specific probes, gather the canonical function\nconfiguration and short-circuit on function states that mimic invocation\nfailures. Misclassifying these produces hours of timeout debugging for a\nproblem that is not a timeout problem.\n\n### Account-wide pre-flight commands\n\nMoved verbatim to [references\u002Fdiagnostic-commands.md](references\u002Fdiagnostic-commands.md) — load on demand.\n\n\n\nMoved verbatim to [references\u002Fdiagnostic-commands.md](references\u002Fdiagnostic-commands.md) — load on demand.\n\n\n\nMoved verbatim to [references\u002Fworked-examples.md](references\u002Fworked-examples.md) — load on demand.\n\n\n## Process — Diagnostic decision tree (apply in symptom order)\n\nThe diagnostic tree is symptom-driven. Pick the entry point based on the\nobserved symptom, then walk the layer-specific probes in order. Each layer\nends with either a positive root-cause confirmation (failing probe that\nmatches the symptom) or a pass that moves to the next layer. **Never emit\nROOT_CAUSE_FOUND without a failing probe that matches the symptom.**\n\n### Step 0: Non-obvious behaviours that change diagnosis\n\nMoved verbatim to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md) — load on demand.\n\n### Step 1: Symptom entry — pick the diagnostic branch\n\nMap the symptom to a branch and jump to that branch's section. If the\nsymptom matches none of the eight categories, route to Step 9 (ESCALATE\nor NEED_MORE_INFO).\n\n| Symptom | Branch |\n|---|---|\n| `Task timed out after X seconds` (sync or async); CloudWatch shows Duration == Timeout | Step 2 — Timeout |\n| `Runtime.ExitError` \u002F `ErrorType: OutOfMemory` \u002F \"MemorySize exceeded\" | Step 3 — OOM |\n| First invocation(s) of an execution environment slow; `InitDuration` > 1s | Step 4 — Cold start |\n| `AccessDenied`, `is not authorized`, \"execution role denied\" | Step 5 — Permissions |\n| `connect ETIMEDOUT`, `ECONNREFUSED`, \"cannot reach S3\u002Finternet\u002FDB\" | Step 6 — VPC connectivity |\n| `Could not decrypt KMS`, `decrypt error`, `ReferenceError: X is not defined` | Step 7 — Environment variables |\n| Async invocations retried forever \u002F DLQ fills; sync caller returns 5xx after X seconds | Step 8 — Invocation type |\n| `ImagePullFailure`, container Lambda fails to initialise | Step 8b — Container image |\n| None of the above | Step 9 — Escalate \u002F NEED_MORE_INFO |\n\n### Step 2: TaskTimeoutException — timeout diagnostic tree\n\nSymptom: the Lambda service killed the function at the configured\ntimeout. CloudWatch invocation record shows `Duration` approximately\nequal to `Timeout`. The last log line before the kill is the best\nevidence of where time was spent.\n\nMoved verbatim to [references\u002Fdiagnostic-commands.md](references\u002Fdiagnostic-commands.md) — load on demand.\n\n**Verdicts:**\n- Timeout too low for normal operation: ROOT_CAUSE_FOUND,\n  `LAYER: TIMEOUT_CONFIG`. Fix: raise the timeout (1-900 seconds).\n- Downstream genuinely slow: ROOT_CAUSE_FOUND,\n  `LAYER: TIMEOUT_DOWNSTREAM`. Fix: address the downstream (DB\n  capacity, dependency error rate, VPC endpoint).\n- CPU-bound (raising memory fixes it): ROOT_CAUSE_FOUND,\n  `LAYER: MEMORY_CONFIG`. Fix: raise memory.\n\n### Step 3: Out-of-memory — Runtime.ExitError\n\nSymptom: CloudWatch invocation record shows `MemorySize` exceeded.\nLogs contain `Runtime.ExitError`, `ErrorType: OutOfMemory`, or \"FATAL\nERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of\nmemory\" (Node).\n\nMoved verbatim to [references\u002Fdiagnostic-commands.md](references\u002Fdiagnostic-commands.md) — load on demand.\n\n**Verdict:** ROOT_CAUSE_FOUND, `LAYER: MEMORY_CONFIG`. Fix: raise\nmemory to a value with ≥20% headroom over observed `MaxMemoryUsed`.\n\n### Step 4: Cold start — high init duration\n\nSymptom: p99 latency on the first invocation of each new execution\nenvironment is elevated; subsequent invocations on the same environment\nare fast. CloudWatch invocation logs show `Init Duration` > 1 second\n(Node\u002FPython) or > 5 seconds (Java\u002F.NET).\n\nMoved verbatim to [references\u002Fdiagnostic-commands.md](references\u002Fdiagnostic-commands.md) — load on demand.\n\n**Verdict:**\n- Cold start is the cost, no mitigation configured, function is sync \u002F\n  latency-sensitive: ROOT_CAUSE_FOUND, `LAYER: COLD_START`. Fix: enable\n  SnapStart (Java) or provisioned concurrency (any runtime).\n- Cold start is the cost, mitigation IS configured but qualifier is\n  wrong (e.g., provisioned concurrency on $LATEST while traffic goes to\n  a version): ROOT_CAUSE_FOUND, `LAYER: COLD_START`. Fix: align the\n  provisioned concurrency with the invoked qualifier.\n\n### Step 5: AccessDenied — execution role and resource policy\n\nSymptom: function logs show an AWS SDK call returned AccessDenied.\nCommon strings: `AccessDenied`, `User: arn:aws:sts::... is not\nauthorized to perform: \u003Cservice>:\u003Caction>`, `Client.UnauthorizedOperation`,\n`KMS.AccessDeniedException`.\n\nMoved verbatim to [references\u002Fdiagnostic-commands.md](references\u002Fdiagnostic-commands.md) — load on demand.\n\n### Step 6: VPC connectivity — function cannot reach network target\n\nSymptom: function logs show `connect ETIMEDOUT`, `ECONNREFUSED`,\n`ENOTFOUND`, or \"cannot reach X\" for any external host or AWS service.\n\nMoved verbatim to [references\u002Fdiagnostic-commands.md](references\u002Fdiagnostic-commands.md) — load on demand.\n\n\n**Verdicts:**\n- Function in public subnet (route to IGW, no NAT): ROOT_CAUSE_FOUND,\n  `LAYER: VPC_CONNECTIVITY`. Fix: move to a private subnet with a NAT\n  Gateway route.\n- Function in private subnet but no NAT and no VPC endpoint:\n  ROOT_CAUSE_FOUND, `LAYER: VPC_CONNECTIVITY`. Fix: add a NAT Gateway\n  OR add a VPC endpoint.\n- VPC endpoint policy denies the action: ROOT_CAUSE_FOUND,\n  `LAYER: VPC_ENDPOINT`. Fix: scope the endpoint policy to allow the\n  action.\n\n### Step 7: Environment variable — KMS and missing variables\n\nSymptom: function fails to start, or fails at the line that reads\n`process.env.X`. Common strings: `Could not decrypt KMS`, `KMS.AccessDeniedException`,\n`decrypt error`, `ReferenceError: X is not defined`.\n\nMoved verbatim to [references\u002Fdiagnostic-commands.md](references\u002Fdiagnostic-commands.md) — load on demand.\n\n\n### Step 8: Invocation type mismatch — async vs sync\n\n#### 8a: Async retry storm\n\nSymptom: caller receives 202 immediately, but downstream state never\nupdates. CloudWatch `Errors` metric spikes; DLQ (if any) fills.\n\nMoved verbatim to [references\u002Fdiagnostic-commands.md](references\u002Fdiagnostic-commands.md) — load on demand.\n\n\n#### 8b: Sync caller timeout (API Gateway → Lambda)\n\nSymptom: API Gateway returns 504 Gateway Timeout or 502 Bad Gateway.\nLambda function completes within its timeout, but the caller has already\ngiven up.\n\nMoved verbatim to [references\u002Fdiagnostic-commands.md](references\u002Fdiagnostic-commands.md) — load on demand.\n\nCommon patterns:\n\n| Pattern | Cause |\n|---|---|\n| Lambda Timeout = 60s, API Gateway returns 504 at 30s | Caller (API Gateway) gives up before Lambda does. Lower Lambda Timeout to ≤ 29s, or redesign as async. |\n| Lambda Duration p99 = 5s but occasional 504s | API Gateway integration timeout or downstream of API Gateway (ALB, CloudFront) timing out. |\n| Lambda returns 502 (internal lambda error) | Function throws an unhandled exception; the error response shape does not match API Gateway's expected format. |\n\n**Verdict:** ROOT_CAUSE_FOUND, `LAYER: INVOCATION_SYNC`. Fix: align\ntimeouts (Lambda Timeout ≤ API Gateway's cap), or move the workload\nto async if the operation legitimately exceeds 29s.\n\n### Step 8b: Container image — ECR pull failures\n\nSymptom: function fails to initialise. Logs show `ImagePullFailure`,\n`ECR image ... not found`, `ImagePullBackOff`, or\n`Runtime.ExitError`.\n\nMoved verbatim to [references\u002Fdiagnostic-commands.md](references\u002Fdiagnostic-commands.md) — load on demand.\n\n### Step 9: Escalate or NEED_MORE_INFO\n\nIf none of the above produced a positive root-cause match, OR the symptom\nclearly indicates an AWS-side incident (region event, ECR outage, KMS\noutage, runtime deprecation forcing shutdown), emit one of:\n\n- **ESCALATE** — AWS-side incident. Surface the AWS Health event ARN,\n  the function's State and LastUpdateStatus, and the relevant\n  CloudTrail error. Recommend opening a Support case. Do NOT continue\n  diagnosing; the cause is outside the customer's control.\n- **NEED_MORE_INFO** — A specific probe requires operator input. List\n  the missing pieces (qualifier \u002F alias, invocation type, caller\n  context, recent deploy timestamps) and the next probe to run once the\n  info is available.\n\n## Output format\n\n```text\nTARGET: \u003Cfunction-name with qualifier>\nVERDICT: ROOT_CAUSE_FOUND | NEED_MORE_INFO | ESCALATE\nREASON: \u003C1-2 sentences naming the failed layer and the failing probe>\nLAYER: \u003CTIMEOUT_CONFIG | TIMEOUT_DOWNSTREAM | MEMORY_CONFIG |\n        COLD_START | PERMISSION_EXECUTION_ROLE |\n        PERMISSION_RESOURCE_POLICY | VPC_CONNECTIVITY | VPC_ENDPOINT |\n        ENV_VAR_KMS | ENV_VAR_MISSING | INVOCATION_ASYNC |\n        INVOCATION_SYNC | ECR_IMAGE | ECR_POLICY |\n        RUNTIME_UNSUPPORTED | UNKNOWN>\nEVIDENCE:\n  - \u003Cobserved symptom — error string or behaviour>\n  - \u003Cfailing probe — command and its output that confirms the cause>\n  - \u003Cpassing probes — layers ruled out>\nREMEDIATION:\n  1. \u003Cspecific action with CLI command>\n  2. \u003Cverification command after the fix>\nCONFIRM: Before executing any state-changing CLI, emit and await operator\n  approval: \"CONFIRM: About to \u003Caction> on \u003Cname> in \u003Cregion>. Proceed?\n  (yes\u002Fno)\"\n```\n\n### Worked example — TaskTimeoutException, downstream DB slow\n\n```text\nTARGET: fn-prod-processor (alias: prod, version 42)\nVERDICT: ROOT_CAUSE_FOUND\nREASON: Function's Timeout is 30s; CloudWatch Duration p99 is 28.5s and\n  Maximum is 30s (function is killed at the cap). The last log line\n  before each kill is \"await dynamodb.put(...)\" — the DynamoDB PutItem\n  is the slow operation. The table's WriteCapacityUnits is set to 100\n  on a provisioned table sustaining 5000 WCU of demand; requests are\n  being throttled (Step 2b\u002F2c).\nLAYER: TIMEOUT_DOWNSTREAM\nEVIDENCE:\n  - Symptom: 30% of invocations return TaskTimeoutException after\n    exactly 30.00 seconds; the remaining 70% succeed in 1-3s.\n  - Probe: aws logs filter-log-events returns \"Task timed out after\n    30.00 seconds\" 47 times in the last hour; the preceding log line\n    in every case is \"Putting item to orders-table\".\n  - Probe: aws cloudwatch get-metric-statistics on\n    aws\u002Fdynamodb WriteThrottleEvents for orders-table shows sustained\n    throttling in the same hour.\n  - Passing: function Memory is 512 MB; MemoryUtilization Maximum is\n    65% (memory is not the issue); function is not VPC-attached\n    (network is not the issue); function role has dynamodb:PutItem\n    on the table (permissions are not the issue).\nREMEDIATION:\n  1. Switch the table to on-demand (pay-per-request) billing mode to\n     absorb the burst, OR raise WriteCapacityUnits to match observed\n     demand:\n     aws dynamodb update-table --table-name orders-table \\\n       --billing-mode PAY_PER_REQUEST --profile \u003Cp>\n  2. Optionally raise the Lambda Timeout to 60s as defence-in-depth\n     against transient spikes:\n     aws lambda update-function-configuration --function-name \\\n       fn-prod-processor --timeout 60 --profile \u003Cp>\n  3. Verify by re-invoking and watching CloudWatch Duration over the\n     next 30 minutes.\nCONFIRM: Before updating the table or function, emit and await:\n  \"CONFIRM: About to switch orders-table to PAY_PER_REQUEST and raise\n   fn-prod-processor Timeout to 60s. Proceed? (yes\u002Fno)\"\n```\n\n### Worked example — OutOfMemory, memory raised\n\nMoved verbatim to [references\u002Fworked-examples.md](references\u002Fworked-examples.md) — load on demand.\n\n### Worked example — ESCALATE, regional Lambda incident\n\nMoved verbatim to [references\u002Fworked-examples.md](references\u002Fworked-examples.md) — load on demand.\n\n## Anti-Patterns — NEVER\n\n- NEVER declare ROOT_CAUSE_FOUND without a failing probe that matches\n  the symptom. A \"process of elimination\" diagnosis erodes operator\n  trust when the real cause is elsewhere.\n\n- NEVER recommend raising the timeout without checking memory first.\n  Lambda CPU scales with memory; many timeouts are CPU-bound and\n  resolve with a memory increase. Raising the timeout alone pays for\n  longer wall-clock without addressing the bottleneck.\n\n- NEVER place a Lambda function in a public subnet for internet\n  access. Lambda functions in public subnets have no internet because\n  they receive no public IP. Always use a private subnet with a NAT\n  Gateway route, or no VPC attachment at all.\n\n- NEVER assume VPC-attached Lambda functions can reach AWS services\n  without configuration. S3 and DynamoDB have free Gateway endpoints;\n  most other services require Interface endpoints (paid) or a NAT\n  Gateway. A function that \"could reach DynamoDB yesterday but not\n  today\" often had the Gateway endpoint deleted or a route changed.\n\n- NEVER add `kms:Decrypt` for the default `aws\u002Flambda` key. The\n  service-managed key decrypts transparently; permission is not\n  required. Adding it is harmless but indicates the diagnosis went\n  down the wrong path. Only customer-managed CMKs require\n  `kms:Decrypt`.\n\n- NEVER assume the function's `$LATEST` configuration matches the\n  alias a caller invoked. Aliases pin to versions; the version's\n  config can differ from `$LATEST`. Always read config with the\n  qualifier the caller used.\n\n- NEVER enable SnapStart on a non-Java function. SnapStart is Java-only\n  on supported managed runtimes (Corretto 11+). Python and Node have\n  fast init already; SnapStart is a no-op or fails silently.\n\n- NEVER conclude \"Lambda is slow\" without separating `InitDuration`\n  from `Duration`. A function with 4500 ms InitDuration and 50 ms\n  Duration has 50 ms application latency; the 4500 ms is one-time per\n  execution environment. Reporting the sum overstates latency.\n\n- NEVER treat async invocation failures as caller-side errors. The\n  caller received 202 and moved on; the retries are entirely\n  server-side. Without a DLQ or OnFailure destination, failed events\n  vanish. Always check `DeadLetterConfig` and `DestinationConfig`.\n\n- NEVER delete an ECR image tag that a Lambda function references.\n  Lambda caches the image digest at function-update time and continues\n  to use the cached digest, but the next function update or cold start\n  on a fresh execution environment fails to pull. Tag immutability on\n  the ECR repo prevents this footgun.\n\n- NEVER cross-account-invoke a Lambda function without configuring\n  BOTH sides. The caller's identity-based `lambda:InvokeFunction` AND\n  the function's resource-based policy must both allow. Adding only\n  one side produces AccessDenied.\n\n- NEVER recommend a container image > 1 GB without flagging the\n  cold-start impact. Each cold start pays the pull cost; a 5 GB image\n  adds 30-60 seconds of init duration on every fresh execution\n  environment.\n\n- NEVER declare the function failed because `LastUpdateStatus:\n  Failed` without reading `LastUpdateStatusReason`. The reason field\n  names the actual failure (often a role permission, invalid layer\n  ARN, or unreachable ECR image) — the function still runs the prior\n  revision and the symptom is the failed update, not a runtime\n  failure.\n\n- NEVER conflate EventSourceMapping retry semantics with async invoke\n  retry semantics. SQS\u002FKafka\u002FDynamoDB Streams sources have\n  batch-level retries (`MaximumRetryAttempts`); async invokes have\n  event-level retries (immediate, +1m, +2m). The diagnostic and\n  remediation differ.\n\n- NEVER assume a function without a VPC has no network path issues.\n  Internet-bound calls go through the Lambda-managed network; rare\n  service events can degrade this path. Always check AWS Health if\n  multiple functions fail simultaneously with no config change.\n\n## Pre-flight safety checks (run before any state-changing CLI)\n\n- **MANDATORY CONFIRMATION GATE.** Before any state-changing operation\n  (`update-function-configuration`, `publish-version`, `update-alias`,\n  `create-event-source-mapping`, `put-repository-policy`), emit and\n  await operator approval. Do NOT execute the CLI until the operator\n  confirms.\n\n- **Read-only first.** Every probe in the diagnostic tree is\n  read-only (`get-function-configuration`, `filter-log-events`,\n  `get-policy`, `describe-*`, `simulate-principal-policy`,\n  `lookup-events`). Do not perform state-changing operations as\n  diagnostic probes.\n\n- **`update-function-configuration --memory-size`** is safe and\n  non-disruptive for memory-only changes; the function continues\n  serving traffic from the prior revision until the update completes.\n\n- **`update-function-configuration --timeout`** is safe; raising the\n  timeout does not cause disruption. Lowering it can cause new\n  failures if invocations legitimately need the prior value.\n\n- **Publishing a version** is non-disruptive; the new version is\n  addressable but does not receive traffic until an alias is shifted.\n\n- **Shifting an alias** is the user-visible cutover. Always confirm\n  before `update-alias --function-version`. Use weighted alias\n  routing for canary deploys.\n\n- **Enabling SnapStart** requires a new version publish and can only\n  be set on a function that is NOT currently SnapStart-enabled.\n  Existing versions do not retroactively benefit; only new invocations\n  of a freshly-published SnapStart-enabled version see the speedup.\n\n- **Provisioned concurrency** is billed per-second. Enabling on a\n  high-traffic alias is expensive; start with a small allocation\n  (e.g., 5) and scale based on spillover metrics.\n\n- **VPC attachment change** triggers an ENI creation in the target\n  subnets; for high-throughput functions this can take 30-60 seconds\n  to propagate. Plan the change outside a traffic peak.\n\n- **ECR repo policy changes** affect every consumer of the repo;\n  tighten policy gradually, never deny-by-default without confirming\n  no Lambda function depends on the repo.\n\n- **Bulk remediation batch limit.** If the diagnosis identifies the\n  same root cause across multiple functions (e.g., a missing\n  `kms:Decrypt` after a key rotation), batch remediation into groups\n  of at most 5 functions, emit a single CONFIRM per batch, and verify\n  between batches.\n\n## Remediation guidance\n\nMoved verbatim to [references\u002Ferror-handling.md](references\u002Ferror-handling.md) — load on demand.\n\n## Deep reference: Lambda invocation layer model\n\nMoved verbatim to [references\u002Finvocation-layer-reference.md](references\u002Finvocation-layer-reference.md) — load on demand.\n\n## Recent AWS features (2024-2026)\n\nMoved verbatim to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md) — load on demand.\n\n\n## References (load on demand)\n\n- [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md) — quick-start rules, mindset, philosophy, Step-0 non-obvious behaviours, recent AWS features\n- [references\u002Fdiagnostic-commands.md](references\u002Fdiagnostic-commands.md) — account-wide pre-flight CLI, function-state \u002F alias gates, per-step probe commands (Steps 2-8b)\n- [references\u002Ferror-handling.md](references\u002Ferror-handling.md) — per-layer remediation guidance with CLI\n- [references\u002Fworked-examples.md](references\u002Fworked-examples.md) — malformed-input NEED_MORE_INFO template, OutOfMemory and ESCALATE worked examples\n- [references\u002Finvocation-layer-reference.md](references\u002Finvocation-layer-reference.md) — layer model deep reference: decision matrix, memory-to-CPU, retry timelines, ENI lifecycle\n\n## Domain\n\nAWS CloudOps \u002F Lambda Serverless Compute, Invocation Diagnostics,\nExecution Role, VPC Networking, and Container Image Distribution.\n\n## AWS documentation\n\n- **AWS Lambda Developer Guide — Configuring Lambda function options** — https:\u002F\u002Fdocs.aws.amazon.com\u002Flambda\u002Flatest\u002Fdg\u002Fconfiguration-function-common.html\n- **Lambda execution environment and runtime** — https:\u002F\u002Fdocs.aws.amazon.com\u002Flambda\u002Flatest\u002Fdg\u002Fruntimes-context.html\n- **Lambda SnapStart** — https:\u002F\u002Fdocs.aws.amazon.com\u002Flambda\u002Flatest\u002Fdg\u002Fsnapstart.html\n- **Provisioned concurrency** — https:\u002F\u002Fdocs.aws.amazon.com\u002Flambda\u002Flatest\u002Fdg\u002Fprovisioned-concurrency.html\n- **Lambda function VPC configuration** — https:\u002F\u002Fdocs.aws.amazon.com\u002Flambda\u002Flatest\u002Fdg\u002Fconfiguration-vpc.html\n- **Lambda environment variables** — https:\u002F\u002Fdocs.aws.amazon.com\u002Flambda\u002Flatest\u002Fdg\u002Fconfiguration-envvars.html\n- **Asynchronous invocation** — https:\u002F\u002Fdocs.aws.amazon.com\u002Flambda\u002Flatest\u002Fdg\u002Finvocation-async.html\n- **Lambda container images** — https:\u002F\u002Fdocs.aws.amazon.com\u002Flambda\u002Flatest\u002Fdg\u002Flambda-images.html\n- **Lambda IAM execution role** — https:\u002F\u002Fdocs.aws.amazon.com\u002Flambda\u002Flatest\u002Fdg\u002Flambda-intro-execution-role.html\n- **AWS Health** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fhealth\u002Flatest\u002Fug\u002F\n",{"name":5,"license":15,"metadata":24,"description":7,"compatibility":44},{"tags":25,"phase":26,"author":27,"domain":28,"family":29,"version":30,"keywords":31,"task_type":32,"complexity":33,"entry_point":34,"skill_class":35,"when_to_use":36,"requires_llm":37,"verdict_shape":38,"when_not_to_use":39,"lifecycle_status":40,"invocation_schema":41,"supports_pipeline":37,"invocation_example":42,"activation_triggers":43},"lambda, compute, troubleshooting, invocation, timeout, oom, cold-start, iam-role, vpc, kms, ecr","2","Jacky Chan — AWS Community Builder","aws-cloudops","Compute","0.1.0","Lambda, TaskTimeoutException, Runtime.ExitError, out of memory, cold start, init duration, SnapStart, provisioned concurrency, AccessDenied, execution role, simulate-principal-policy, VPC, NAT Gateway, VPC endpoint, environment variable, KMS decrypt, invocation type, EventSourceMapping, DLQ, destination, container image, ECR, image pull, troubleshooting","troubleshoot","high","false","capability","Diagnosing a Lambda function invocation failure (timeout, OOM, AccessDenied, cold-start latency, network error, env var decrypt error, async retry storm, container image pull failure), walking a symptom to the failed layer with verify and fix commands, validating why an application's invocation returns an error, or triaging a \"the Lambda is broken\" page where the root cause may be config, execution role, network, runtime, or container registry — not necessarily the function code itself.","true","ROOT_CAUSE_FOUND | NEED_MORE_INFO | ESCALATE","Code-level debugging of the function handler (use the application logs and a debugger), CloudFront\u002FLambda@Edge origin issues (use the CloudFront distribution logs), Step Functions orchestration debugging (use the Step Functions execution history), IAM policy authoring for the execution role (use iam-least-privilege-advisor), or VPC route table \u002F NACL posture audits (use ec2-security-group-auditor). This skill diagnoses invocation-time failures; it does not tune handler code or audit steady-state configuration posture.","active","Input: either (a) a symptom description (error message, observed behaviour, \"function returns 502\", \"async invocations are retried forever\"), optionally paired with the function configuration (get-function-configuration output) and recent CloudWatch logs, OR (b) a FunctionName plus caller context (invocation type, source ARN, observed error) for live-account diagnosis. Output: a deterministic TARGET\u002FVERDICT\u002FREASON\u002FLAYER\u002FEVIDENCE\u002FREMEDIATION block where VERDICT ∈ {ROOT_CAUSE_FOUND, NEED_MORE_INFO, ESCALATE} and LAYER ∈ {TIMEOUT_CONFIG, TIMEOUT_DOWNSTREAM, MEMORY_CONFIG, COLD_START, PERMISSION_EXECUTION_ROLE, PERMISSION_RESOURCE_POLICY, VPC_CONNECTIVITY, VPC_ENDPOINT, ENV_VAR_KMS, ENV_VAR_MISSING, INVOCATION_ASYNC, INVOCATION_SYNC, ECR_IMAGE, ECR_POLICY, RUNTIME_UNSUPPORTED, UNKNOWN}.","# Minimal valid input (offline symptom classification):\nSymptom: \"Lambda function fn-prod-processor was invoked 200 times\nin the last hour; 30 returned TaskTimeoutException after 30s; the\nrest succeeded.\"\nFunctionName: fn-prod-processor\nRuntime: nodejs20.x\nTimeout: 30\nMemorySize: 256\nHandler: index.handler\nLastLogEvents: 1 timeout at \"await dynamodb.put(...).promise()\"\n  followed by \"Task timed out after 30.00 seconds\"\nInvocation type: RequestResponse (sync), called from API Gateway","Lambda TaskTimeoutException, Task timed out, Lambda out of memory, Runtime.ExitError, Lambda cold start, init duration, Lambda AccessDenied, execution role denied, Lambda cannot reach internet, Lambda cannot reach S3, Lambda VPC timeout, Lambda environment variable KMS, Lambda decrypt error, Lambda async retry storm, EventSourceMapping retry, Lambda container image pull, ECR image pull error, Lambda Provisioned concurrency, troubleshoot Lambda invocation","Agent runtime that reads SKILL.md (Claude Code, Cursor, Windsurf, Codex, Gemini). Offline symptom classification works from pasted error messages and function configuration. Live-account diagnosis uses aws lambda get-function-configuration, aws logs get-log-events \u002F filter- log-events, aws lambda get-policy, aws ec2 describe-security-groups, aws lambda get-event-source-mapping, aws lambda get-function-url, aws kms describe-key, aws ecr describe-repositories \u002F get-repository-policy, aws...","main","eeace51bd5dd1db2030729d83eeab988861553aa","skills\u002Flambda-invocation-troubleshooter",0,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills","https:\u002F\u002Fgithub.com\u002Fjhkchan","CTO & Co-Founder @Beever-AI  & @votee. CAISP. AWS Community Builder. Organizer@GDGCloudHK. MongoDB Champion. Technopreneur + Infornographer.","2026-09-24 08:54:10",{"source":8,"skillName":5,"commands":54,"prompt":64,"zipAvailable":65},[55,58,61],{"tool":56,"command":57},"npx","npx skills add jhkchan\u002Faws-agent-skills --skill lambda-invocation-troubleshooter",{"tool":59,"command":60},"bunx","bunx skills add jhkchan\u002Faws-agent-skills --skill lambda-invocation-troubleshooter",{"tool":62,"command":63},"pnpm","pnpm dlx skills add jhkchan\u002Faws-agent-skills --skill lambda-invocation-troubleshooter","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Flambda-invocation-troubleshooter\u002FSKILL.md",true,[67,73,77,81,85,89,93,97,101,105,109,113,117,121,125,129,133,137,141,145],{"path":68,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":71,"sourceHtmlUrl":72},"eval\u002Ftest-cases.yaml","REFERENCE","参考文档",10952,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Flambda-invocation-troubleshooter\u002Feval\u002Ftest-cases.yaml",{"path":74,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":75,"sourceHtmlUrl":76},"evals\u002Fbaselines\u002Fecr-image-cross-account-policy.md",590,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Flambda-invocation-troubleshooter\u002Fevals\u002Fbaselines\u002Fecr-image-cross-account-policy.md",{"path":78,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":79,"sourceHtmlUrl":80},"evals\u002Fbaselines\u002Fkms-decrypt-cmk-role-missing.md",383,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Flambda-invocation-troubleshooter\u002Fevals\u002Fbaselines\u002Fkms-decrypt-cmk-role-missing.md",{"path":82,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":83,"sourceHtmlUrl":84},"evals\u002Fbaselines\u002Foom-memory-too-low.md",396,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Flambda-invocation-troubleshooter\u002Fevals\u002Fbaselines\u002Foom-memory-too-low.md",{"path":86,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":87,"sourceHtmlUrl":88},"evals\u002Fbaselines\u002Ftimeout-downstream-dynamodb-throttled.md",860,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Flambda-invocation-troubleshooter\u002Fevals\u002Fbaselines\u002Ftimeout-downstream-dynamodb-throttled.md",{"path":90,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":91,"sourceHtmlUrl":92},"evals\u002Fbaselines\u002Fvpc-no-nat-no-internet.md",430,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Flambda-invocation-troubleshooter\u002Fevals\u002Fbaselines\u002Fvpc-no-nat-no-internet.md",{"path":94,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":95,"sourceHtmlUrl":96},"evals\u002Feval_config.yaml",1970,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Flambda-invocation-troubleshooter\u002Fevals\u002Feval_config.yaml",{"path":98,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":99,"sourceHtmlUrl":100},"evals\u002Fevals.json",4778,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Flambda-invocation-troubleshooter\u002Fevals\u002Fevals.json",{"path":102,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":103,"sourceHtmlUrl":104},"evals\u002Fprompts\u002Fecr-image-cross-account-policy.md",1944,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Flambda-invocation-troubleshooter\u002Fevals\u002Fprompts\u002Fecr-image-cross-account-policy.md",{"path":106,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":107,"sourceHtmlUrl":108},"evals\u002Fprompts\u002Fkms-decrypt-cmk-role-missing.md",1518,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Flambda-invocation-troubleshooter\u002Fevals\u002Fprompts\u002Fkms-decrypt-cmk-role-missing.md",{"path":110,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":111,"sourceHtmlUrl":112},"evals\u002Fprompts\u002Foom-memory-too-low.md",1195,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Flambda-invocation-troubleshooter\u002Fevals\u002Fprompts\u002Foom-memory-too-low.md",{"path":114,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":115,"sourceHtmlUrl":116},"evals\u002Fprompts\u002Ftimeout-downstream-dynamodb-throttled.md",1501,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Flambda-invocation-troubleshooter\u002Fevals\u002Fprompts\u002Ftimeout-downstream-dynamodb-throttled.md",{"path":118,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":119,"sourceHtmlUrl":120},"evals\u002Fprompts\u002Fvpc-no-nat-no-internet.md",1422,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Flambda-invocation-troubleshooter\u002Fevals\u002Fprompts\u002Fvpc-no-nat-no-internet.md",{"path":122,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":123,"sourceHtmlUrl":124},"examples\u002FREADME.md",7252,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Flambda-invocation-troubleshooter\u002Fexamples\u002FREADME.md",{"path":126,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":127,"sourceHtmlUrl":128},"references\u002Fadvanced-patterns.md",12925,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Flambda-invocation-troubleshooter\u002Freferences\u002Fadvanced-patterns.md",{"path":130,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":131,"sourceHtmlUrl":132},"references\u002Fdiagnostic-commands.md",23102,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Flambda-invocation-troubleshooter\u002Freferences\u002Fdiagnostic-commands.md",{"path":134,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":135,"sourceHtmlUrl":136},"references\u002Ferror-handling.md",3798,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Flambda-invocation-troubleshooter\u002Freferences\u002Ferror-handling.md",{"path":138,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":139,"sourceHtmlUrl":140},"references\u002Finvocation-layer-reference.md",14001,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Flambda-invocation-troubleshooter\u002Freferences\u002Finvocation-layer-reference.md",{"path":142,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":143,"sourceHtmlUrl":144},"references\u002Fworked-examples.md",3511,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Flambda-invocation-troubleshooter\u002Freferences\u002Fworked-examples.md",{"path":146,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":147,"sourceHtmlUrl":148},"skill.usf.yaml",4573,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Flambda-invocation-troubleshooter\u002Fskill.usf.yaml",[150,157,164,171,178,185],{"skillNo":151,"name":152,"nameZh":6,"description":153,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":154,"categories":155,"keywords":156,"publishedAt":19},"01M7ADVD60X4PCAPKSE58P9NDC","xray-tracing-deployer","Deploys AWS X-Ray distributed tracing with production-grade configuration: X-Ray daemon deployment (EC2 systemd, ECS sidecar, EKS DaemonSet, Lambda built-in), SDK instrumentation (Java, Python, Node.js, Go, .NET) with annotations and metadata, sampling rules (default reservoir + rate vs custom rules with URL \u002F method \u002F service-name predicates), service map generation, trace query and retrieval, groups and insights, CloudWatch ServiceLens integration, IAM permissions (PutTraceSegments, GetSamplingRules), and latest features (Lambda Powertools tracing, OpenTelemetry \u002F ADOT Collector support, W3C trace context). Emits a READY_TO_DEPLOY checklist with every configuration item verified. Use when enabling X-Ray on a new application, adding tracing to ECS \u002F EKS \u002F Lambda, validating a sampling configuration, or generating daemon deployment CLI and IaC templates. Triggers: X-Ray, distributed tracing, X-Ray daemon, sampling rules, service map, X-Ray SDK, OpenTelemetry, ADOT, Lambda Powertools, CloudWatch ServiceLens.","https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fxray-tracing-deployer\u002FSKILL.md",[],[],{"skillNo":158,"name":159,"nameZh":6,"description":160,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":161,"categories":162,"keywords":163,"publishedAt":19},"01M7ADTVJ7DCBM9CB1FY51GH7J","wellarchitected-workload-auditor","Audits AWS Well-Architected Tool workloads for review staleness, per-pillar high-risk issue counts, milestone tracking gaps, and remediation plan completeness. Emits a deterministic verdict (STALE_REVIEW | HIGH_RISK | CONFIG_GAP | OK) per workload with per-pillar risk breakdown, milestone trend analysis, and specific remediation. Use when reviewing Well-Architected workloads, checking WA review freshness, auditing high-risk issues per pillar, validating milestone coverage, or tracking remediation plans.","https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fwellarchitected-workload-auditor\u002FSKILL.md",[],[],{"skillNo":165,"name":166,"nameZh":6,"description":167,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":168,"categories":169,"keywords":170,"publishedAt":19},"01M7ADT59G6FTTNZYHT2QRPNNP","wellarchitected-review-operator","Operates AWS Well-Architected Tool reviews end-to-end — creates workloads, runs pillar reviews (operational excellence, security, reliability, performance, cost optimization, sustainability, Prosperity), answers questions with risk-tier rationale, generates reports and improvement plans, creates milestones, and integrates with Trusted Advisor and Well-Architected Labs. Runs deterministic pre-checks (workload existence, lens availability, pillar coverage), emits the exact update-answer \u002F get-consolidated-report CLI behind a CONFIRM gate, and verifies risk-tier transitions. Emits READY | BLOCKED | COMPLETED. Use when creating a workload, answering pillar questions, generating an improvement plan, creating a milestone, or integrating with Trusted Advisor. Triggers: well-architected tool, well architected review, workload review, pillar, operational excellence, security, reliability, performance, cost optimization, sustainability, prosperity, improvement plan, milestone, trusted advisor.","https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fwellarchitected-review-operator\u002FSKILL.md",[],[],{"skillNo":172,"name":173,"nameZh":6,"description":174,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":175,"categories":176,"keywords":177,"publishedAt":19},"01M7ADSH5JA9QHNPPHQCD7EVA7","wafv2-web-acl-deployer","Provisions AWS WAFv2 Web ACLs with correct production defaults: scope selection (CLOUDFRONT vs REGIONAL), managed rule groups (AWSManagedRulesCommonRuleSet, SQLiRuleSet, LinuxRuleSet, WindowsRuleSet, IPReputationList, BotControlRuleSet, AmazonIpReputationList, ATP), custom rules (byte match, IP set, regex pattern, geo match, size constraint, rate-based), rule priority ordering, logging destinations (Kinesis Firehose, CloudWatch Logs, S3), resource association (ALB, API Gateway, CloudFront), rate-based rules with aggregate keys (IP, forwarded IP), Challenge and CAPTCHA actions, and account takeover prevention. Emits a READY_TO_DEPLOY checklist. Use when creating a Web ACL, attaching managed rules, configuring rate limiting, enabling WAF logging, associating a Web ACL with an ALB\u002FAPI Gateway\u002FCloudFront, or configuring CAPTCHA\u002FChallenge actions. Triggers: create WAF Web ACL, WAFv2, managed rule groups, WAF rate limiting, WAF logging, WAF CAPTCHA, WAF Challenge action, bot control, ATP managed rules.","https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fwafv2-web-acl-deployer\u002FSKILL.md",[],[],{"skillNo":179,"name":180,"nameZh":6,"description":181,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":182,"categories":183,"keywords":184,"publishedAt":19},"01M7ADRYFAT8R73FBNCHRC573X","wafv2-web-acl-auditor","Audits AWS WAFv2 Web ACL configurations to determine whether the ACL provides effective protection: default-action posture (Allow vs Block), managed-rule-group coverage gaps, rule effectiveness (BLOCK vs COUNT, shadow\u002Fbypass rules, stale exclusions), rate-based rule correctness, logging and visibility configuration, and text-transformation bypass vectors. Emits a deterministic verdict per Web ACL. Use when reviewing a WAFv2 Web ACL for security posture, checking managed-rule coverage, validating rate-limit configuration, auditing WAF logging, or hardening a WAF before production deployment. Triggers: WAF, WAFv2, Web ACL, managed rule group, AWSManagedRules, rate-based rule, CAPTCHA, Challenge, OverrideAction, Count mode, forwarded IP, Bot Control, ATP, text transformation, WAF logging, WAF visibility, OWASP, SQLi, XSS, RFI.","https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fwafv2-web-acl-auditor\u002FSKILL.md",[],[],{"skillNo":186,"name":187,"nameZh":6,"description":188,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":189,"categories":190,"keywords":191,"publishedAt":19},"01M7ADR8W7G72JX4KFGN03QK8Q","waf-rule-deployer","Provisions AWS WAFv2 rule sets with production defaults: Web ACL creation (CloudFront scope in us-east-1 vs Regional scope), rule groups (managed vs custom) with capacity planning in WCU (Web ACL Capacity Units, 1500 default per ACL), managed rule groups (AWSManagedRulesCommonRuleSet, AWSManagedRulesSQLiRuleSet, AWSManagedRulesAmazonIpReputationList, AWSManagedRulesLinuxRuleSet, AWSManagedRulesWindowsRuleSet, AWSManagedRulesUnixRuleSet), custom rules (byte-match, regex pattern set, geo-match, rate-based), IP set and regex pattern set resources, rule priority ordering (lowest number evaluated first), action types (allow, block, count, CAPTCHA, Challenge), bot control managed rule group, account takeover. Triggers: create WAF rule, WAF managed rule group, WAF custom rule, WAF byte match, WAF geo match, WAF rate based rule, WAF IP set, WAF regex pattern set, WAF WCU budget, WAF CloudFront ACL, WAF logging Kinesis Firehose, WAF bot control, WAF ATP, WAF label matching, WAF Challenge action, WAF CAPTCHA.","https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fwaf-rule-deployer\u002FSKILL.md",[],[]]