Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/epsagon/list-lambdas
Enumerate Lambda functions across all regions with useful metadata 💡💵⚙
https://github.com/epsagon/list-lambdas
aws-lambda devops devops-tools epsagon lambda serverless serverless-functions
Last synced: about 2 months ago
JSON representation
Enumerate Lambda functions across all regions with useful metadata 💡💵⚙
- Host: GitHub
- URL: https://github.com/epsagon/list-lambdas
- Owner: epsagon
- License: mit
- Created: 2018-01-26T13:18:49.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2022-02-21T11:16:26.000Z (almost 3 years ago)
- Last Synced: 2024-12-11T03:33:40.693Z (2 months ago)
- Topics: aws-lambda, devops, devops-tools, epsagon, lambda, serverless, serverless-functions
- Language: Python
- Homepage: https://epsagon.com
- Size: 253 KB
- Stars: 187
- Watchers: 16
- Forks: 38
- Open Issues: 1
-
Metadata Files:
- Readme: README.rst
- Contributing: CONTRIBUTING.rst
- License: LICENSE
Awesome Lists containing this project
README
List Lambdas functions
=====================.. image:: https://github.com/epsagon/list-lambdas/blob/master/list-lambdas.png
:align: center(Based on `photo `_ by Valve Software / `CC BY-SA 4.0 `_)
Motivation
----------
- Read our blog post, `"The curse of dead Lambda functions" `__.
- Enumerate list of Lambda functions from **every region**.
- Detect **"dead"** or unused Lambda functions.Setup
-----
.. code-block:: bashgit clone https://github.com/epsagon/list-lambdas
cd list-lambdas/
pip install -r requirements.txt
python list_lambdas.pyDocker
-----
.. code-block:: bashgit clone https://github.com/epsagon/list-lambdas
cd list-lambdas/
docker build -t list_lambdas:latest .
docker run --rm -v $HOME/.aws:/root/.aws -t list_lambdas:latest --profile myprofileExample Outputs
---------------CLI:
.. image:: https://github.com/epsagon/list-lambdas/blob/master/examples/cli.png
CSV file:
.. image:: https://github.com/epsagon/list-lambdas/blob/master/examples/csv.png
Usage
-----Filter only Lambda functions that have not been active in the last 10 days:
.. code-block:: bash
python list_lambdas.py --inactive-days-filter 10
Print extended information to the screen (same as in the CSV file):
.. code-block:: bash
python list_lambdas.py --all
Sort by a chosen column (e.g. by last invocation time):
.. code-block:: bash
python list_lambdas.py --sort-by last-invocation
Output table (**with extra data**) to a CSV file:
.. code-block:: bash
python list_lambdas.py --csv lambdas.csv
Provide credentials:
.. code-block:: bash
python list_lambdas.py --token-key-id --token-secret