Control: Lambda functions should be in a VPC
Description
This control checks whether Lambda functions are in a VPC. It does not evaluate the VPC subnet routing configuration to determine public access. You should ensure that Amazon Lambda functions are not attached to public subnets.
Usage
Run the control in your terminal:
powerpipe control run aws_perimeter.control.lambda_function_in_vpc
Snapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe control run aws_perimeter.control.lambda_function_in_vpc --share
Steampipe Tables
SQL
select arn as resource, case when vpc_id is null then 'alarm' else 'ok' end status, case when vpc_id is null then title || ' is not in VPC.' else title || ' is in VPC ' || vpc_id || '.' end reason , region, account_idfrom aws_lambda_function;