DCF for Serverless Resources is Early Access in 9.0. To request Early
Access, contact your Aviatrix account team.
Supported Serverless Resource Types
GCP Cloud Functions v2 are not separately inventoried. They appear in the
Cloud Run services inventory as
CLOUD_RUN type.Prerequisites
- Aviatrix Controller 9.0 or later.
- DCF enabled.
- Each serverless resource has VPC or VNet attachment configured. See the next section for the configuration each resource type needs.
- An Aviatrix gateway in the same VPC/VNet, or in a peered network where traffic can be inspected.
Required Network Configuration per Resource Type
How It Works
When you onboard a cloud account, the Cloud Asset Inventory discovers serverless resources from the cloud provider APIs and adds them to the inventory alongside VMs, VPCs, and other cloud assets. For each serverless resource, the inventory records the network interfaces or subnet CIDRs that DCF uses for policy enforcement:- AWS Lambda and ECS: the network interfaces created by the cloud provider in your VPC are inventoried. Each function has its own interfaces that persist even when the function scales to zero. DCF applies policy using the private IPs of these interfaces.
- GCP Cloud Functions and Cloud Run: the VPC Access Connector or direct VPC access configuration is recorded. DCF applies policy using the connector’s IP CIDR or the subnet CIDR.
- Azure Function Apps and Container Apps: the VNet integration subnet is recorded. DCF applies policy using the subnet CIDR or the static IP of the managed environment’s internal load balancer.
Create a SmartGroup for Serverless Resources
SmartGroups for serverless resources usetype = "serverless" as the required
match expression. You can scope a SmartGroup to specific resource types,
regions, accounts, names, or tags.
Using Terraform
match_expressions blocks within a single selector to OR
across different serverless types or accounts.
SmartGroup Filter Parameters
Examples
Match all Lambda functions in a region:Policy Enforcement Behavior
When a serverless resource is in a SmartGroup used by a DCF rule, Aviatrix picks the enforcement addresses based on the resource type:DCF only filters egress (outbound) traffic from serverless resources. Ingress
traffic filtering is not supported because incoming requests are routed
through the cloud provider’s internal infrastructure.
Limitations
- Early Access: This feature is in Early Access in 9.0. SmartGroup serverless support is configurable through Terraform; CoPilot UI scope for serverless SmartGroup creation is limited in this release.
- Serverless resources without VPC or VNet attachment are not discoverable by the Cloud Asset Inventory.
- Azure Container Apps are enforced using the static IP of the managed environment’s internal load balancer, which may fall outside the subnet CIDR if the IP space is exhausted.
- On AWS, if two or more Lambda functions share the same subnet and security group, they may share the same network interface. The inventory associates each interface with a single function.
- Policy enforcement requires an Aviatrix gateway in the same VPC/VNet or in a peered network where traffic can be inspected.