RegionalNatGatewayProviderProps Struct
Properties for a Regional NAT Gateway Provider.
Regional NAT Gateways provide automatic multi-AZ redundancy with a single gateway that scales across availability zones.
Example
const eip = new ec2.CfnEIP(this, 'NatEip');
new ec2.Vpc(this, 'Vpc1', {
natGatewayProvider: ec2.NatProvider.regionalGateway({
eip,
}),
});
new ec2.Vpc(this, 'Vpc2', {
natGatewayProvider: ec2.NatProvider.regionalGateway({
allocationId: eip.attrAllocationId,
}),
});
Properties
allocationIdstringallocation_idstrallocationIdStringAllocationIdstringAllocationId*string= A new EIP is automatically alloc…#Cannot be specified together with eip. Ignored when availabilityZoneAddresses is specified.
default
Default: A new EIP is automatically allocated
availabilityZoneAddressesAvailabilityZoneAddress[]availability_zone_addressestyping.List[AvailabilityZoneAddress]availabilityZoneAddressesList<AvailabilityZoneAddress>AvailabilityZoneAddressesAvailabilityZoneAddress[]AvailabilityZoneAddresses*[]AvailabilityZoneAddress= Automatic mode: AWS manages AZ c…#notes · default
When specified, allocationId and eip are ignored. This enables manual mode for Regional NAT Gateway where you control EIP allocation per AZ.
In manual mode the gateway only serves the listed Availability Zones and does not expand to other zones automatically, so every Availability Zone that contains a private subnet routed through this gateway must be listed. When the zone names are known at synthesis time, a private subnet in an unlisted zone is rejected with an error. Entries that use availabilityZoneId or unresolved tokens cannot be checked and are assumed to be correct.
Default: Automatic mode: AWS manages AZ coverage and EIP allocation
Cannot be specified together with allocationId. Ignored when availabilityZoneAddresses is specified.
default
Default: A new EIP is automatically allocated