Most developers agree that AWS Lambda functions are great. It’s cheap and easy to start with, it’s scalable, and most importantly — it just works.

But there are challenges as well. One of the common challenges is to keep track of all your functions, which often leads to “dead” functions.

Dead AWS Lambda functions are functions that have been cold for a long time (makes sense, doesn’t it?). Usually, those AWS Lambda functions are useless, and should probably be removed.

But it’s not just about keeping your resources nice and clean — there are real issues with dead functions:

  1. Management: code and error management are common issues in every complex serverless architecture — but when you add dozens of unused functions, things become much more complicated.
  2. Security: more functions means more opportunities for an attacker to try and take advantage of your code. A function that hasn’t been used for a long time is most likely outdated and may have wrong permissions or contain old external libraries.
  3. Performance analysis: when trying to obtain a deep understanding of the entire architecture, such as the end-to-end performance, or the costs of specific transactions, having unused resources makes everything a lot harder.

So we can agree that dead AWS Lambdas functions are bad. What can we do about it?

dead aws lambda functions

I See Dead Functions

Solution for dead AWS Lambda functions

To solve this problem, we at Epsagon have created an open-source project: list-lambdas. It’s a Python script that enumerates your AWS Lambda functions across all AWS regions and provides useful information, such as the function’s memory settings, its last invocation time and more. It can help in identifying dead Lambda functions easily.


git clone
cd list-lambdas/
pip install -r requirements.txt

Example Outputs

CLI Output

CSV output

Example Usage

The usage is straightforward using the CLI.

Filter out only AWS Lambda functions that have not been active in the last 10 days:
python --inactive-days-filter 10

Output table (with extra data) to a CSV file:
python --csv lambdas.csv

Print extended information to the screen (same as in the CSV file):
python --all

Sort by a chosen column (e.g. by last invocation time):
python --sort-by last-invocation


Dead serverless functions are a real issue — but it can be handled rather easily. Best practices such as giving your functions meaningful names are relevant in serverless as well. Tools like list-lambdas and others can help keep your architecture clean and steady, which ultimately leads to better software.

More about AWS Lambda:

AWS Lambda Layers: Getting Started Guide

Troubleshooting AWS Lambda 101

Error Handling in AWS Lambda With Wrappers

How to Handle AWS Lambda Errors Like a Pro

Best Practices for AWS Lambda Timeouts