Skip to main content

Use Case for AWS Lambda Error Rate

  1. Configure AWS Lambda Error Rate
  2. Use Case for AWS Lambda Error Rate
  3. Triage Guides by Violation Type
    1. Triage AWS Lambda Error Rate LAMBDA_HIGH_ERROR_RATE

Overview

This policy helps monitor the error rate of AWS Lambda functions. High error rates in Lambda functions can lead to increased costs due to retries and could potentially indicate underlying issues with the function itself. This policy provides continuous assessment of Lambda functions, flagging those with error rates exceeding 10% daily over the past 7 days.

Pros and Cons

Pros:

  • Cost Efficiency: Identifying high error rates helps in managing costs by preventing unnecessary retries.
  • Issue Detection: Helps detect underlying issues in Lambda functions.

Cons:

  • No Auto-remediation: The policy only detects issues and does not provide automatic resolution.

Policy Functionality

Variables

  • threshold: Default 10. This defines the error rate percentage threshold beyond which a function is flagged.

Violation Types

  • LAMBDA_HIGH_ERROR_RATE: This violation occurs when the error rate of a Lambda function exceeds the defined threshold within a given period (7 days).

Policy Workflow

  1. Observation Phase: The policy fetches the Errors and Invocations metrics for the provided Lambda function over the past 7 days and calculates the error rate.
  2. Evaluation Phase: The calculated error rate is compared against the provided threshold. If it exceeds the threshold, a violation is generated.