Repository: prowler-cloud/prowler
Issue category: Bug Report

Could not run with argurment "-s lambda" or "-s awslambda"
### Steps to Reproduce

export LOG_LEVEL=INFO && python prowler.py aws -s lambda



### Expected behavior

Prowler should scan for awslambda service

### Actual Result with Screenshots or Logs

2024-11-27 13:57:25,877 [File: __main__.py:280]         [Module: __main__]       ERROR: There are no checks to execute. Please, check your input arguments


### How did you install Prowler?

Cloning the repository from github.com (git clone)

### Environment Resource

Local PC

### OS used

MacOS Sonoma 14.6.1

### Prowler version

Prowler 5.0.0 (You are running the latest version, yay!)

### Pip version

pip 24.3.1 

### Context

_No response_


Functions to edit:
prowler/lib/check/models.py:CheckMetadata.list_by_service

Patch:
diff --git a/prowler/lib/check/models.py b/prowler/lib/check/models.py
index 446440b6aae..b060c58e86e 100644
--- a/prowler/lib/check/models.py
+++ b/prowler/lib/check/models.py
@@ -322,8 +322,9 @@ def list_by_service(bulk_checks_metadata: dict, service: str = None) -> set:
         checks = set()
 
         if service:
-            if service == "lambda":
-                service = "awslambda"
+            # This is a special case for the AWS provider since `lambda` is a reserved keyword in Python
+            if service == "awslambda":
+                service = "lambda"
             checks = {
                 check_name
                 for check_name, check_metadata in bulk_checks_metadata.items()

Test patch: diff --git a/tests/lib/check/models_test.py b/tests/lib/check/models_test.py
index 7cf470c7e6f..414de90288c 100644
--- a/tests/lib/check/models_test.py
+++ b/tests/lib/check/models_test.py
@@ -32,6 +32,35 @@
     Compliance=[],
 )
 
+mock_metadata_lambda = CheckMetadata(
+    Provider="aws",
+    CheckID="awslambda_function_url_public",
+    CheckTitle="Check 1",
+    CheckType=["type1"],
+    ServiceName="lambda",
+    SubServiceName="subservice1",
+    ResourceIdTemplate="template1",
+    Severity="high",
+    ResourceType="resource1",
+    Description="Description 1",
+    Risk="risk1",
+    RelatedUrl="url1",
+    Remediation={
+        "Code": {
+            "CLI": "cli1",
+            "NativeIaC": "native1",
+            "Other": "other1",
+            "Terraform": "terraform1",
+        },
+        "Recommendation": {"Text": "text1", "Url": "url1"},
+    },
+    Categories=["categoryone"],
+    DependsOn=["dependency1"],
+    RelatedTo=["related1"],
+    Notes="notes1",
+    Compliance=[],
+)
+
 
 class TestCheckMetada:
 
@@ -188,6 +217,46 @@ def test_list_by_service(self, mock_recover_checks, mock_load_metadata):
         # Assertions
         assert result == {"accessanalyzer_enabled"}
 
+    @mock.patch("prowler.lib.check.models.load_check_metadata")
+    @mock.patch("prowler.lib.check.models.recover_checks_from_provider")
+    def test_list_by_service_lambda(self, mock_recover_checks, mock_load_metadata):
+        # Mock the return value of recover_checks_from_provider
+        mock_recover_checks.return_value = [
+            ("awslambda_function_url_public", "/path/to/awslambda_function_url_public")
+        ]
+
+        # Mock the return value of load_check_metadata
+        mock_load_metadata.return_value = mock_metadata_lambda
+
+        bulk_metadata = CheckMetadata.get_bulk(provider="aws")
+
+        result = CheckMetadata.list(
+            bulk_checks_metadata=bulk_metadata, service="lambda"
+        )
+
+        # Assertions
+        assert result == {"awslambda_function_url_public"}
+
+    @mock.patch("prowler.lib.check.models.load_check_metadata")
+    @mock.patch("prowler.lib.check.models.recover_checks_from_provider")
+    def test_list_by_service_awslambda(self, mock_recover_checks, mock_load_metadata):
+        # Mock the return value of recover_checks_from_provider
+        mock_recover_checks.return_value = [
+            ("awslambda_function_url_public", "/path/to/awslambda_function_url_public")
+        ]
+
+        # Mock the return value of load_check_metadata
+        mock_load_metadata.return_value = mock_metadata_lambda
+
+        bulk_metadata = CheckMetadata.get_bulk(provider="aws")
+
+        result = CheckMetadata.list(
+            bulk_checks_metadata=bulk_metadata, service="awslambda"
+        )
+
+        # Assertions
+        assert result == {"awslambda_function_url_public"}
+
     @mock.patch("prowler.lib.check.models.load_check_metadata")
     @mock.patch("prowler.lib.check.models.recover_checks_from_provider")
     def test_list_by_service_invalid(self, mock_recover_checks, mock_load_metadata):