# AddNatGatewayOptions

Options for adding a NAT gateway to a public subnet.

- Source: [`aws-ec2/lib/vpc.ts`](https://github.com/aws/aws-cdk/blob/v2.274.0/packages/aws-cdk-lib/aws-ec2/lib/vpc.ts#L2529)
- 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';
const addNatGatewayOptions: ec2.AddNatGatewayOptions = {
  maxDrainDuration: cdk.Duration.minutes(30),
};
```

## Properties

- `maxDrainDuration`: [Duration](/cdk/api/v2/docs/aws-cdk-lib.Duration.html) = Duration.seconds(350) — Maximum amount of time to wait before forcibly releasing the IP addresses if connections are still in progress.
