Skip to main content

Use Case for AWS Lambda Timeout Policy

  1. Configure AWS Lambda Timeout Policy
  2. Use Case for AWS Lambda Timeout Policy
  3. Triage Guides by Violation Type
    1. Triage AWS Lambda Timeout Policy EXCESSIVE_TIMEOUT_EXCEEDED

AWS Lambda Timeout Policy

Overview

This policy helps in identifying AWS Lambda functions with excessive timeout configurations which can lead to retries and increased execution time, ultimately resulting in additional request charges and billed duration.

Pros

  • Helps in optimizing costs by identifying underutilized functions.
  • Enhances function performance by highlighting potential inefficiencies.
  • Provides continuous monitoring for better resource management.

Cons

  • May require adjustments based on specific function use cases.
  • Potential for false positives due to varying function execution times.

How it Works

The policy checks the average duration of the Lambda function executions over the past 7 days and compares it with the configured timeout. If the average duration exceeds 10% of the configured timeout, a violation is reported.

Variables

  • timeoutPercentThreshold: The threshold percentage for the timeout check. Default is 10.

The policy scans the Lambda functions continuously and alerts on any violations detected.

Violation Types

  • EXCESSIVE_TIMEOUT_EXCEEDED: Reported when the average execution duration exceeds 10% of the configured timeout.