Create NAT Gateway

Create an Elastic IP

  1. Access to EC2

    • Select Elastic IPs
    • Select Allocate Elastic IP address

EC2

  1. In the Allocate Elastic IP address interface

    • Public IPv4 address pool, choose Amazon’s pool of IPv4 addresses
    • Select Allocate

EC2

  1. We have just successfully created a Public IP Address

EC2

Create NAT Gateway

  1. Access to VPC

    • Choose NAT Gateways
    • Create NAT gateway

EC2

  1. In the NAT gateway interface

    • Name, as NAT gateway
    • Subnet, select Public subnet 2
    • Connectivity type, select Public
    • Elastic IP allocation ID, select created Elastic IP.

EC2

  1. Select Create NAT gateway

EC2 EC2

Create Route table - Private and associate private subnet

  1. In the VPC interface

    • Select Route Tables
    • Select Create route table

EC2

  1. In the Route table interface

    • Name, as Route table - Private
    • VPC, as Workshop1 vpc
    • Select Cretae route table

EC2

  1. Finish creating Route table - Private

EC2

  1. In the Route table - Private interface:

    • Select Subnet Associations
    • Select Edit subnet associations

EC2

  1. In the Edit subnet associations interface

    • Select 2 private subnet
    • Select Save associations

EC2

  1. In the Route table - Private interface

    • Select Routes
    • Select Edit routes

EC2

  1. In the Edit routes interface

    • Select Add route
    • Select Destination: 0.0.0.0/0
    • Target: NAT Gateway
    • Select Save changes

EC2

  1. Checking Routes

EC2

  1. Check whether 2 Private EC2 can ping to the internet. The results here are ok.

EC2 EC2