Check ID:
Provider: AWS
Service:
Severity: LOW
Categories:
Resource type:
awslambda_function_inside_vpcProvider: AWS
Service:
awslambdaSeverity: LOW
Categories:
trust-boundariesResource type:
AwsLambdaFunctionWhat this check verifies
AWS Lambda function uses VPC networking with specified subnets and security groups, rather than the default Lambda-managed network. Presence of a VPC association (vpc_id) indicates private connectivity to VPC resources.
Risk
Without VPC attachment, functions lack network isolation and granular egress control, weakening confidentiality and integrity. Traffic must use public endpoints, raising risks of data exfiltration and SSRF via unrestricted outbound. If private databases are required, missing VPC access can impact availability.Recommendation
Attach functions to a VPC with private subnets and restrictive security groups to enforce least privilege and egress control.- Prefer VPC endpoints for AWS services
- Use NAT only when necessary
- Spread subnets across AZs for resilience
- Govern with IAM conditions requiring
VpcIds,SubnetIds, andSecurityGroupIds.
Remediation
- CLI
- Terraform
- Native IaC
- Dashboard steps
References
- https://docs.aws.amazon.com/lambda/latest/dg/configuration-vpc.html
- https://repost.aws/pt/knowledge-center/lambda-dedicated-vpc
- https://www.trendmicro.com/trendaivisiononecloudriskmanagement/knowledge-base/aws/Lambda/function-in-vpc.html
- https://docs.aws.amazon.com/securityhub/latest/userguide/lambda-controls.html#lambda-3
- https://stackoverflow.com/questions/55074793/how-can-we-force-aws-lamda-to-run-securely-in-a-vpc
- https://www.techtarget.com/searchCloudComputing/answer/How-do-I-configure-AWS-Lambda-functions-in-a-VPC/
Where this check fires
This check runs on every scheduled scan against your AWS account. Findings appear at Cloud Security → Findings filterable byCheck ID = awslambda_function_inside_vpc. To re-evaluate after a fix, hit Run now on the account’s schedule under Cloud Security → Schedules — the next scan re-checks this control and marks the finding fixed or keeps it persistent.
← Back to AWS checks