This check verifies whether an AWS Lambda function is deployed within a Virtual Private Cloud (VPC). Deploying Lambda functions inside a VPC improves security by allowing control over the network environment, reducing the exposure to public internet threats.
Risk
Lambda functions not deployed in a VPC may expose your application to increased security risks, including unauthorized access and data breaches. Without the network isolation provided by a VPC, your Lambda functions are more vulnerable to attacks.
prowler aws --checks awslambda_function_inside_vpc
arn:partition:lambda:region:account-id:function/function-name
Recommendation
Configure your AWS Lambda functions to operate within a Virtual Private Cloud (VPC) to enhance security and control network access.
Remediation
aws lambda update-function-configuration --region <region-name> --function-name <function-name> --vpc-config SubnetIds=<subnet-id-1>,<subnet-id-2>,SecurityGroupIds=<security-group-id>
Source Code
Resource Type
AwsLambdaFunction