Skip to main content

A CDK construct to build Simple NAT instance on AWS.

Project description

Simple NAT

Release NPM version pypi version

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.

Arch diagram

Install

TypeScript/JavaScript:

yarn add cdk-construct-simple-nat

or

npm install cdk-construct-simple-nat

Usage

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

new SimpleNAT(this, 'SimpleNAT', {
  vpc,
  natSubnetsSelection: {
    subnetType: SubnetType.PUBLIC,
    onePerAz: true,
  },
})
.withGithubRoute();

See the complete example.

FAQ

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

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

zxkane.cdk-construct-simple-nat-0.2.70.tar.gz (253.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

zxkane.cdk_construct_simple_nat-0.2.70-py3-none-any.whl (252.0 kB view details)

Uploaded Python 3

File details

Details for the file zxkane.cdk-construct-simple-nat-0.2.70.tar.gz.

File metadata

  • Download URL: zxkane.cdk-construct-simple-nat-0.2.70.tar.gz
  • Upload date:
  • Size: 253.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2

File hashes

Hashes for zxkane.cdk-construct-simple-nat-0.2.70.tar.gz
Algorithm Hash digest
SHA256 dbbf576eda4345bb4dbfbb530da61d8aec10e0ecf8f1352be0cff39b891f1beb
MD5 03df65f8eae2b144e5708b95136d0481
BLAKE2b-256 4745f705949fcc6979b5f3b30dd2a789ef43097ab25fc06fb3e7c3a46f8a26a4

See more details on using hashes here.

File details

Details for the file zxkane.cdk_construct_simple_nat-0.2.70-py3-none-any.whl.

File metadata

  • Download URL: zxkane.cdk_construct_simple_nat-0.2.70-py3-none-any.whl
  • Upload date:
  • Size: 252.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2

File hashes

Hashes for zxkane.cdk_construct_simple_nat-0.2.70-py3-none-any.whl
Algorithm Hash digest
SHA256 06e8c2bf05c9c527feed1954000dffbcfe66b4e7d3440f0be85ff6cb96aa0614
MD5 c3b5cd9441d1cf7f1d8c585851232b88
BLAKE2b-256 d4b84449e398e60facd93fa1358012d6e8b940ba9a02de549d2932597b7bde04

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page