# VpcEgressConfigurationProperty

The VPC egress configuration for the network connector.

Specifies the subnets, security groups, and network protocol for routing outbound traffic through your VPC.

- Source: Generated at build time
- Type last changed: v2.278.0 · 20 Nov 2026

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_lambda as lambda } from 'aws-cdk-lib';
const vpcEgressConfigurationProperty: lambda.CfnNetworkConnector.VpcEgressConfigurationProperty = {
  associatedComputeResourceTypes: ['associatedComputeResourceTypes'],
  networkProtocol: 'networkProtocol',
  securityGroupIds: ['securityGroupIds'],
  subnetIds: ['subnetIds'],

  // the properties below are optional
  elasticIpConfiguration: {
    type: 'type',
  },
};
```

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_lambda as lambda_

vpc_egress_configuration_property = lambda.CfnNetworkConnector.VpcEgressConfigurationProperty(
    associated_compute_resource_types=["associatedComputeResourceTypes"],
    network_protocol="networkProtocol",
    security_group_ids=["securityGroupIds"],
    subnet_ids=["subnetIds"],

    # the properties below are optional
    elastic_ip_configuration=lambda.CfnNetworkConnector.ElasticIpConfigurationProperty(
        type="type"
    )
)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.lambda.*;

VpcEgressConfigurationProperty vpcEgressConfigurationProperty = VpcEgressConfigurationProperty.builder()
        .associatedComputeResourceTypes(List.of("associatedComputeResourceTypes"))
        .networkProtocol("networkProtocol")
        .securityGroupIds(List.of("securityGroupIds"))
        .subnetIds(List.of("subnetIds"))

        // the properties below are optional
        .elasticIpConfiguration(ElasticIpConfigurationProperty.builder()
                .type("type")
                .build())
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Lambda;

var vpcEgressConfigurationProperty = new VpcEgressConfigurationProperty {
    AssociatedComputeResourceTypes = new [] { "associatedComputeResourceTypes" },
    NetworkProtocol = "networkProtocol",
    SecurityGroupIds = new [] { "securityGroupIds" },
    SubnetIds = new [] { "subnetIds" },

    // the properties below are optional
    ElasticIpConfiguration = new ElasticIpConfigurationProperty {
        Type = "type"
    }
};
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

vpcEgressConfigurationProperty := &VpcEgressConfigurationProperty{
	AssociatedComputeResourceTypes: []*string{
		jsii.String("associatedComputeResourceTypes"),
	},
	NetworkProtocol: jsii.String("networkProtocol"),
	SecurityGroupIds: []*string{
		jsii.String("securityGroupIds"),
	},
	SubnetIds: []*string{
		jsii.String("subnetIds"),
	},

	// the properties below are optional
	ElasticIpConfiguration: &ElasticIpConfigurationProperty{
		Type: jsii.String("type"),
	},
}
```

## Properties

- `associatedComputeResourceTypes`: string[] (required) — The types of Lambda compute resources that can use this connector.

  Supported values are MicroVm and WebFunction.

- `elasticIpConfiguration`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnNetworkConnector.ElasticIpConfigurationProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.CfnNetworkConnector.ElasticIpConfigurationProperty.html) — Specifies whether Lambda assigns an Elastic IP address to each of the network connector's elastic network interfaces (ENIs).

  If you don't specify an Elastic IP configuration, no Elastic IP address is assigned. When you update this configuration, the change applies to the ENIs of the new connector version.

- `networkProtocol`: string (required) — The network protocol for the connector.

  Specify IPv4 for IPv4-only networking, or DualStack for both IPv4 and IPv6.

- `securityGroupIds`: string[] (required) — The IDs of the VPC security groups to attach to the ENIs.

  All security groups must be in the same VPC as the subnets.

- `subnetIds`: string[] (required) — The IDs of the VPC subnets where Lambda provisions elastic network interfaces (ENIs).

  Specify 1 to 16 subnets. All subnets must be in the same VPC.
