Find vulnerable Lambda Functions with Amazon Inspector
In this lab, you'll enable Amazon Inspector and use it to detect a real-world code vulnerability in a pre-deployed AWS Lambda function. The lab environment includes two Lambda functions: one containing a hardcoded AWS secret access key (CWE-798) and one clean function for comparison. You'll activate Inspector, enable Lambda Standard and Code scanning, and observe how Inspector automatically discovers and scans the functions. Once scanning completes, you'll explore the resulting Critical severity finding, examine the exact line of vulnerable code, and review the remediation guidance provided.
- 9 guided tasks

Scenario
Your lab account runs two Lambda functions. One of them holds a secret access key in its code. Amazon Inspector is not switched on yet. Switch it on, let it scan the functions, then read the finding it reports and the fix it suggests.
What you will learn
- Activate Amazon Inspector in an AWS account.
- Turn on Lambda standard scanning and Lambda code scanning.
- Find the Critical finding that Inspector reports for a Lambda function.
- Read the vulnerable line of code and the remediation advice in the finding.
- Say why a Lambda function must not hold a secret key in its code.
Find vulnerable Lambda Functions with Amazon Inspector
Included in Cybr Premium.