[Bug]: Memory leakage in aws lambda scanning mechanism #2516
Labels
feature-request
New feature request for Prowler.
provider/aws
Issues/PRs related with the AWS provider
Steps to Reproduce
Run prowler on an aws account with large amount of lambda functions.
The command we used to run prowler python package
prowler aws --severity critical high -M json -o . -F output --quiet --filter-region us-east-1
Expected behavior
Prowler will run and finish the scan and provide findings.
Actual Result with Screenshots or Logs
The system has terminated Prowler's process due to extensive memory usage.
How did you install Prowler?
From pip package (pip install prowler)
Environment Resource
Docker container on AWS Fargate
OS used
Python 3.9 Docker image
Prowler version
3.5.1
Pip version
pip 23.01
Context
Issue Description:
We encountered Prowler process being killed by the system (docker container) and exiting with -9 status code, which happened on large-scale aws users which a large amount of lambda functions in their AWS accounts.
What we tried:
After investigating the code of the
awslambd
service of Prowler, we found out the logic of this service is zipping all of the lambda functions codes inself.functions
Lambda class property.This situation results in a memory overload when there are a lot of lambda functions in the scanned account.
here is a screenshot of the code snippet:
The text was updated successfully, but these errors were encountered: