CostLensLambda High Error Rate

Lambda High Error Rate

CostLens flags Lambda functions failing on a high share of invocations — failed runs still bill for the compute they use and often trigger retries.

Updated June 20261 min read

AWS Lambda charges for every invocation's execution time, including ones that error out. A function with a high error rate is paying for failing work — and once upstream retries kick in, you often pay for the same failing work several times over. CostLens surfaces these functions so you can fix the root cause and cut both cost and reliability risk.

How it works

CostLens lists all Lambda functions

Calls lambda:ListFunctions in each configured region.

Reads invocation and error metrics

Queries CloudWatch Invocations and Errors over the past 14 days.

Flags high error rates

Flags functions whose error rate exceeds 5% of invocations, with enough monthly traffic to be meaningful (very low-traffic functions are skipped).

Estimates wasted spend

Estimates the compute billed for failing invocations (and their retries). Severity scales with the estimated monthly waste.

What to do

  1. Open the recommendation and review the error rate and invocation volume.
  2. Investigate the function logs in CloudWatch to find the failure cause (bad input, downstream timeout, permissions).
  3. Fix the root cause in your code/configuration — this check is advisory, there is no automated fix.
  4. Re-run analysis; the finding clears once the error rate drops below the threshold.

Reliability and cost together

A high error rate usually signals a correctness problem as well as wasted spend — fixing it improves both.

Severity levels

SeverityEstimated monthly savings
critical>$500
high$100–$500
medium$20–$100
low<$20

Required IAM permissions

Read-only — covered by the CostLens ReadOnlyAccess policy from AWS Accounts:

lambda:ListFunctions
cloudwatch:GetMetricStatistics

Limitations

  • Advisory only — CostLens does not change function code or configuration.
  • Functions with very low invocation volume are skipped to avoid noise from small samples.
CostLens
Previous
Savings Plan Coverage
CostLens
Next
Lambda Timeout/Throttle