You can add tags to Lambda functions, so you can exclude them from Amazon Inspector Lambda code scans. Excluding functions from scans can prevent unactionable alerts. When you tag a function for exclusion, the tag must have the following key-value pair.
-
Key –
InspectorCodeExclusion
-
Value –
LambdaCodeScanning
This topic describes how to tag a function for exclusion from code scans. For more information about adding tags in Lambda, see Using tags on Lambda functions.
To exclude a function from code scans
-
Sign in using your credentials, and then open the Lambda console at https://console.aws.amazon.com/lambda/
. -
From the navigation pane, choose Functions.
-
Choose the name of the function you would want to exclude from Amazon Inspector Lambda code scans.
-
Choose Configuration, and then choose Tags.
-
Choose Manage tags, and then Add new tag.
-
For Key, enter
InspectorCodeExclusion
. -
For Value, enter
LambdaCodeScanning
-
-
Choose Save.