# RegionalNatGatewayProvider

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.

Extends: NatProvider › RegionalNatGatewayProvider

- Source: [`aws-ec2/lib/nat.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/aws-ec2/lib/nat.ts#L460)
- Type last changed: v2.272.0 · 30 Sep 2026

## Example

```ts
// 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

```ts
new RegionalNatGatewayProvider(props?: RegionalNatGatewayProviderProps)
```

## Properties

- `configuredGateways`: [GatewayConfig](/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.GatewayConfig.html)[] — 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

- `configureNat(options: ConfigureNatOptions): void` — Called by the VPC to configure NAT.

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

- `configureSubnet(subnet: PrivateSubnet): void` — Configures subnet with the gateway.

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

- `gateway(props?: NatGatewayProps): NatProvider` (static) — Use NAT Gateways to provide NAT services for your VPC.

  NAT gateways are managed by AWS.

- `instance(props: NatInstanceProps): NatInstanceProvider` (static) — use instanceV2. 'instance' is deprecated since NatInstanceProvider uses a instance image that has reached EOL on Dec 31 2023

  NAT instances are managed by you, but in return allow more configuration.

  Be aware that instances created using this provider will not be
  automatically replaced if they are stopped for any reason. You should implement
  your own NatProvider based on AutoScaling groups if you need that.

- `instanceV2(props: NatInstanceProps): NatInstanceProviderV2` (static) — Use NAT instances to provide NAT services for your VPC.

  NAT instances are managed by you, but in return allow more configuration.

  Be aware that instances created using this provider will not be
  automatically replaced if they are stopped for any reason. You should implement
  your own NatProvider based on AutoScaling groups if you need that.

- `regionalGateway(props?: RegionalNatGatewayProviderProps): RegionalNatGatewayProvider // chainable` (static) — Use a Regional NAT Gateway to provide NAT services for your VPC.

  Regional NAT Gateways provide automatic multi-AZ redundancy with a single
  gateway that scales across availability zones. AWS automatically manages
  AZ coverage and EIP allocation.
