EC2 instance not internet access


Hi Team,

I have deployed the one EC2 instance but , I am not able to access the internet access on EC2. I have followed the below steps but not able to resolve the issues. Can you please let me know if i miss something to get internet.

  1. Create the one subnet
  2. Create the Internet gateways and attached the VPC
  3. Created the Route table and added the internet gateway to route table with in routes.
  4. deployed the EC2 with above mentioned subnet with enable the auto assign ip address option
asked 3 months ago175 views
3 Answers


Can you confirm that the route table for the subnet where EC2 is running has a route destined for the internet gateway?
It is possible that you are editing the route table for a different subnet.
Also, do your EC2 security group's inbound rules allow the required communication?
For example, if you want to access via HTTP, you need to allow HTTP as described in the document below.

profile picture
answered 3 months ago
  • Thanks Riku, I have updated with above mentioned Ports but still not getting internet access on EC2. i think something missing from route table or internet gateway.

    Note: i have turned off the windows firewall as well as


Is the instance in a private or public subnet? If it is in a private subnet, you need to create a NAT GW and use that to route to the internet as private addresses are not routable on the internet. If it is a public subnet, make sure you have a public/EIP assigned to the instance.

answered 3 months ago

Here are the steps to configure an EC2 instance to have internet access in AWS:

  1. Create a VPC with a public subnet. Use the VPC wizard in the AWS console to create a VPC with a public subnet. This will automatically create an internet gateway and attach it to the VPC.
  2. Launch the EC2 instance in the public subnet. When launching the EC2 instance, select the public subnet you created as the subnet to launch the instance into. This will assign a public IP address to the instance.
  3. Configure a security group. When launching the instance, configure a security group that allows inbound traffic on ports that you need to access, such as SSH, HTTP etc. This will allow that traffic to reach the instance.
  4. Optionally, you can assign an Elastic IP. Though not required, you can allocate an Elastic IP and associate it with the instance to give it a static public IP address.

The key steps are creating a public subnet with an internet gateway, launching the instance into the public subnet, and configuring the security group to allow required inbound traffic. Following these steps will ensure your EC2 instance can be reached from the internet.

answered 3 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions