Skip to main content

How to create AWS Internet Gateway and edit route tables?


A VPC has been created with an address scope, subnets have been created within that scope and EC2 instances have been created in the VPC.





Now, you wish to provide your EC2 instances with Internet access. This can be done either by selection "Allocate a public IP" during the instance creation or allocating an Elastic IP to your account and associating the elastic IP to your instance. All this is possible only if you have an Internet Gateway associated with the VPC and the route table having the internet routes (or default route) pointing towards Internet Gateway.





Let's create Internet Gateway. Go to Services >> VPC >> On the left pane, under Virtual Private Cloud, click Internet Gateways.





Internet Gateway




Click on "Create internet gateway", enter the Name tag and "Create"





Internet Gateway




Now associate the Internet Gateway with a VPC, by clicking on the internet gateway (just created), and Actions: Attach to VPC





Attach to VPC




In my case since it is already attached,, the Attach to VPC option is grayed out.





Now modify the route table to add default route towards this Internet Gateway:





Go to Services >> VPC >> On the left navigation pane, under Virtual Private Cloud >> Route Tables. Select the route table, click on Routes in the pane below. Edit routes and add the desired route.





Add default route to the IGW




And that's it!


Comments

  1. Since the admin of this website is working, no hesitation very rapidly it
    will be well-known, due to its feature contents.

    ReplyDelete

Post a Comment