Use Case for AWS Lambda Error Rate
Quick Links
- Configure AWS Lambda Error Rate
- Use Case for AWS Lambda Error Rate
- Triage Guides by Violation Type
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
: Default10
. 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
- Observation Phase: The policy fetches the
Errors
andInvocations
metrics for the provided Lambda function over the past 7 days and calculates the error rate. - Evaluation Phase: The calculated error rate is compared against the provided threshold. If it exceeds the threshold, a violation is generated.