class RegionalNatGatewayProvider
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.EC2.RegionalNatGatewayProvider |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsec2#RegionalNatGatewayProvider |
Java | software.amazon.awscdk.services.ec2.RegionalNatGatewayProvider |
Python | aws_cdk.aws_ec2.RegionalNatGatewayProvider |
TypeScript (source) | aws-cdk-lib » aws_ec2 » RegionalNatGatewayProvider |
Extends
Nat
Provider for Regional NAT Gateways.
Regional NAT Gateways provide automatic multi-AZ redundancy with a single gateway that scales across availability zones. Unlike zonal NAT gateways, a regional NAT gateway does not require a public subnet and is created at the VPC level.
See also: https://docs.aws.amazon.com/vpc/latest/userguide/nat-gateways-regional.html
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as cdk from 'aws-cdk-lib';
import { aws_ec2 as ec2 } from 'aws-cdk-lib';
import { aws_ec2 as interfaces_ec2 } from 'aws-cdk-lib/interfaces';
declare const eIPRef: interfaces_ec2.IEIPRef;
const regionalNatGatewayProvider = new ec2.RegionalNatGatewayProvider(/* all optional props */ {
allocationId: 'allocationId',
availabilityZoneAddresses: [{
allocationIds: ['allocationIds'],
// the properties below are optional
availabilityZone: 'availabilityZone',
availabilityZoneId: 'availabilityZoneId',
}],
eip: eIPRef,
maxDrainDuration: cdk.Duration.minutes(30),
});
Initializer
new RegionalNatGatewayProvider(props?: RegionalNatGatewayProviderProps)
Parameters
Properties
| Name | Type | Description |
|---|---|---|
| configured | Gateway[] | Return list of gateways spawned by the provider. |
configuredGateways
Type:
Gateway[]
Return list of gateways spawned by the provider.
A regional NAT gateway is not bound to a single Availability Zone, so az
is the sentinel string 'regional' rather than a zone name.
Methods
| Name | Description |
|---|---|
| configure | Called by the VPC to configure NAT. |
| configure | Configures subnet with the gateway. |
configureNat(options)
public configureNat(options: ConfigureNatOptions): void
Parameters
- options
ConfigureNat Options
Called by the VPC to configure NAT.
Don't call this directly, the VPC will call it automatically.
configureSubnet(subnet)
public configureSubnet(subnet: PrivateSubnet): void
Parameters
- subnet
PrivateSubnet
Configures subnet with the gateway.
Don't call this directly, the VPC will call it automatically.

.NET
Go
Java
Python
TypeScript (