Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,29 @@ app.synth();
```
Please refer [here](/API.md) to check how to use individual resource constructs.

## Pinning egress to a single NAT gateway

By default every private subnet gets an automatic `0.0.0.0/0` route to the NAT gateway in its own AZ. Set `skipDefaultNatRoute: true` on a subnet group to opt out, and declare your own default route so all AZs of the group egress through one NAT gateway:

```typescript
{
subnetGroupName: 'PocSingleNat',
subnetType: ec2.SubnetType.PRIVATE_WITH_EGRESS,
cidrBlock: ['10.0.112.0/20', '10.0.128.0/20', '10.0.144.0/20'],
availabilityZones: ['ap-south-1a', 'ap-south-1b', 'ap-south-1c'],
skipDefaultNatRoute: true,
routes: [
{
routerType: ec2.RouterType.NAT_GATEWAY,
destinationCidrBlock: '0.0.0.0/0',
routerId: 'nat-0123456789abcdef0', // the single NAT gateway
},
],
}
```

Traffic from the other AZs crosses AZ boundaries to reach that NAT gateway (cross-AZ data charges apply), and that NAT's AZ becomes a single point of failure for the group.

## Route 53 hosted zones

Hosted zones are modeled separately from the `Network` construct. For private
Expand Down
Loading