Create NAT Gateway

Create NAT Gateway

Generate an Elastic IP address

  1. Access EC2
  • Select Elastic IPs
  • Select Allocate Elastic IP address

Create NAT Gateway

  1. In the Allocate Elastic IP address interface
  • Public IPv4 address pool, select Amazon’s pool of IPv4 addresses
  • Select Allocate

Create NAT Gateway

  1. We have successfully created a Public IP Address: 13.213.151.199

Create NAT Gateway

  1. Access to VPC
  • Select NAT Gateways
  • Create NAT gateway

Create NAT Gateway

  1. In NAT gateway interface
  • Name, enter NAT gateway
  • Subnet, select Public subnet 2
  • Connectivity type, select Public
  • Elastic IP allocation ID, select Elastic IP just created.

Create NAT Gateway

  1. Select Create NAT gateway

Create NAT Gateway

  1. Successfully created NAT gateway

Create NAT Gateway

Create Route table - Private and assign to private subnets.

  1. In the VPC interface
  • Select Route Tables
  • Select Create route table

Create NAT Gateway

  1. In the Route table interface
  • Name, enter Route table - Private
  • VPC, select ASG vpc
  • Select Cretae route table

Create NAT Gateway

  1. Finish creating Route table - Private

Create NAT Gateway

  1. In the Route table - Private interface
  • Select Subnet Associations
  • Select Edit subnet associations

Create NAT Gateway

  1. In the Edit subnet associations interface
  • Choose 2 private subnets
  • Select Save associations

Create NAT Gateway

  1. In the Route table - Private interface
  • Select Routes
  • Select Edit routes

Create NAT Gateway

  1. In the Edit routes interface
  • Select Add route
  • Select Destination: 0.0.0.0/0
  • Target: NAT Gateway
  • Select Save changes

Create NAT Gateway

  1. Double check Routes

Create NAT Gateway

  1. Test ping amazon.com successfully from EC2 Private.
ping amazon.com -c5

Create VPC