Skip to main content

Triage AWS Lambda Functions should not have an excessive number of old versions EXCESS_VERSIONS

  1. Configure AWS Lambda Functions should not have an excessive number of old versions
  2. Use Case for AWS Lambda Functions should not have an excessive number of old versions
  3. Triage Guides by Violation Type
    1. Triage AWS Lambda Functions should not have an excessive number of old versions EXCESS_VERSIONS

Triage Guide for EXCESS_VERSIONS

Understand

Why should I care about fixing this issue? Managing the number of Lambda function versions is important to control costs and maintain simplicity in function management.

Validate

How am I sure that this alert is true and accurate? This policy scans the number of versions for a specified Lambda function and compares it against the threshold variable.

What is the data source for this policy? The data source is the AWS Lambda service, specifically the ListVersionsByFunction API.

How do I retrieve it manually? You can manually list the versions of a Lambda function using the AWS CLI:

aws lambda list-versions-by-function --function-name my-function

Does this policy scan on a schedule or is it Reactive? This policy is reactive and will run when the function is modified.

Triage

What is the impact if it is unfixed? Excessive versions can lead to increased costs and make function management more complex.

Does this problem get worse over time if it is unaddressed? Yes, as more versions are created, the problem will worsen.

Can remediation cause outages or downtime to any other running service? No, addressing this issue should not cause outages or downtime.

Act

What do I do to fix this alarm? Review the versions of your Lambda function and delete any unnecessary versions to bring the count within the acceptable threshold.

Reflect

What should I do if this alarm wasn't a good use of time?

  • Adjust the threshold variable to a more appropriate value.
  • Disable the policy if it doesn't fit your use case.