Skip to content
v2.274.0

ConfigureNatOptions Struct ​

Options passed by the VPC when NAT needs to be configured.

Don't use this directly, the VPC will pass it automatically.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_ec2 as ec2 } from 'aws-cdk-lib';

declare const privateSubnet: ec2.PrivateSubnet;
declare const publicSubnet: ec2.PublicSubnet;
declare const vpc: ec2.Vpc;
const configureNatOptions: ec2.ConfigureNatOptions = {
  natSubnets: [publicSubnet],
  privateSubnets: [privateSubnet],
  vpc: vpc,
};

Properties ​

natSubnetsPublicSubnet[]nat_subnetstyping.List[PublicSubnet]natSubnetsList<PublicSubnet>NatSubnetsPublicSubnet[]NatSubnets*[]PublicSubnetrequired#
The public subnets where the NAT providers need to be placed.

For Regional NAT Gateways, this should be an empty array as they don't require public subnets.

privateSubnetsPrivateSubnet[]private_subnetstyping.List[PrivateSubnet]privateSubnetsList<PrivateSubnet>PrivateSubnetsPrivateSubnet[]PrivateSubnets*[]PrivateSubnetrequired#
The private subnets that need to route through the NAT providers.

There may be more private subnets than public subnets with NAT providers.

vpcVpcvpcVpcvpcVpcVpcVpcVpcVpcrequired#
The VPC we're configuring NAT for.