pypi package 'zxkane-cdk-construct-simple-nat'

Popularity: Low
Description: A CDK construct to build Simple NAT instance on AWS.
Installation: pip install zxkane-cdk-construct-simple-nat
Last version: 0.2.388 (Download)
Size: 250.6 kB
License: Apache-2.0


Last modified: February 22, 2023 12:17 AM (7 months ago)
Versions released in one year: 116
Weekly downloads: 66
10/02/202212/18/202203/05/202306/04/202308/20/2023020040060080002468released versions / week
  • Versions released
  • Weekly downloads


Simple NAT

It's a CDK construct to create NAT instances on AWS.

It supports adding specific IP CIDRs to route tables of VPC, the network traffic to those IP CIDRs will be forwarded to the NAT instances.

It supports routing to below services out of box,

  • Github git servers
  • Google
  • Cloudflare



yarn add cdk-construct-simple-nat


npm install cdk-construct-simple-nat


import { SimpleNAT } from 'cdk-construct-simple-nat';

new SimpleNAT(this, 'SimpleNAT', {
  natSubnetsSelection: {
    subnetType: SubnetType.PUBLIC,
    onePerAz: true,

See the complete example and API doc.


What's the difference between EC2 NAT instances and NAT instances created by this construct

There are below differences,

  • EC2 NAT instance will route all Internet traffic to itself by default
  • NAT instance uses depracated Amazon Linux AMI, this construct always uses latest Amazon Linux 2 AMI
  • NAT instances created by this construct can work with NAT gateways together, you can have multiple NAT instances in one VPC
  • This construct can help when only routing specific traffic(for example, github/gist) to NAT instances which acts as transit proxy

What's the difference between CDK built-in NAT instances and NAT instances created by this construct

  • CDK built-in NAT instances has to be created with VPC stack, this construct can add NAT instances to any existing VPC
  • You can use this construct multiple NAT instances for different purposes
  • This construct allows you customize the instances how to route the traffic

The deployment fails due to the routes in route table exceeds the limit

The default routes in route table is 50, the deployment will fail if adding routes more than the limit of your account. You can increase the limit up to 1000 routes per route table via service quota.

How to exclude IPv6 CIDR with built-in github/google/cloudflare routes

You can exclude IPv6 CIDR like below,

new SimpleNAT(this, 'SimpleNAT', {
  excludeIPv6: true,