Skip to main content


Showing posts from November 22, 2019

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 s

How to attach an Elastic IP to an EC2 instance

So you have created a VPC and your EC2 instance is ready.. (here I am assuming we haven't configured public IP, while creating EC2 instance). Let us now allocate an Elastic IP address to our AWS account from the Amazon's reserved public IP range. This can be done by Services >> EC2 >> Scroll down the left navigation pane and under Network & Security, click on Elastic IPs . Click on the Allocate Elastic IP address button AWS Elastic IP Once this IP address is allocated, select the Elastic IP, click on Actions and click on "Associate Elastic IP address", as below: Associate Elastic IP with an instance This would bring up the below page which gives an option to select the EC2 instance which this Elastic IP needs to be allocated to. [I have erased my Elastic IP address and the Instance ID] Associate Elastic IP with an instance And that should be it. There is a catch here, however! The above process won't work if there is no Internet Gateway associa