Check provider logo

Lambda function is configured with VPC subnets in at least two Availability Zones

awslambda_function_vpc_multi_az

Severitymedium
Serviceawslambda
by Prowler

AWS Lambda functions attached to a VPC use subnets that span at least the required number of Availability Zones (2 by default).

The evaluation counts the unique AZs of the function's configured subnets.

Risk

Single-AZ placement limits availability. An AZ outage or subnet/IP exhaustion can block ENI creation and VPC access, causing failed invocations, timeouts, and event backlogs.

This degrades uptime and can delay processing of critical events.

Run this check with Prowler CLI

prowler aws --checks awslambda_function_vpc_multi_az

Recommendation

Distribute VPC-connected functions across subnets in 2 distinct AZs to ensure fault tolerance.

  • Choose subnets from different AZs
  • Avoid AZ-pinned configs or fixed IPs
  • Provide per-AZ egress/endpoints and routing
  • Regularly test AZ failover Aligns with resilience and defense in depth.

Remediation

CLI

aws lambda update-function-configuration --function-name <example_resource_name> --vpc-config SubnetIds=<subnet_id_az1>,<subnet_id_az2>,SecurityGroupIds=<example_security_group_id>

Native IaC
Terraform
Other
  1. Open the Lambda console and select the function
  2. Go to Configuration > VPC > Edit
  3. Select the target VPC and choose at least two subnets in different Availability Zones
  4. Select a security group
  5. Click Save

Source Code

Resource Type

AwsLambdaFunction

References