Amazon Inspector Lambda code scanning should be enabled
Ensures Amazon Inspector Lambda code scanning is enabled in each Region where the account has Lambda functions, so function code is checked for flaws such as injection, data leaks and weak cryptography. Its findings quote the code, which can show hardcoded credentials. AWS offers it in some Regions only; a Region without it produces no finding, and its function code is not scanned.
- service
- Inspector
- severity
- High
- scope
- evaluated in every region
How to fix it
In the console
Amazon Inspector → Account management → Activate
With the AWS CLI
aws inspector2 enable --resource-types LAMBDA LAMBDA_CODE --region <region>With Terraform
resource "aws_inspector2_enabler" "this" {
account_ids = [data.aws_caller_identity.current.account_id]
resource_types = ["LAMBDA", "LAMBDA_CODE"]
}
See which of your accounts this check is failing on.
Book a demo