I have amazon VPC set through wizard as \"public only network\", so all my instances are in public subnet.
Instances within VPC that have Elastic IP assigned connect
All that needs to be done to fix this problem, is to disable "source/destination check" for the instance you have configured to do NAT. This can be done in the AWS console, under "Instance Actions".
Reference
Or create a NAT Instance within the public VPC and add a static route to that NAT instance
route add -net 0.0.0.0 netmask 0.0.0.0 gw 10.0.0.5 eth0
where 10.0.0.5 is your nat instance, just make sure your the security group which contains the NAT instance can accept internal traffic from the boxes you require internet access
The docs tell you should add a NAT Instance
Did you check the Network ACL on the subnet?
Cross check the security groups for rules.
The route table looks fine. It should work.
Security Groups -> Outbound
* ALL Traffic ALL ALL 0.0.0.0/0 Allow
Please allow Outbound, if you want to connect to external servers like google.com or even want to update- sudo apt-get update
You can allow the outbound using AWS front-end goto Security Groups -> Outbound
Make sure you select the right group for your AWS instance
Instances without EIPs can access the Internet in one of two ways Instances without EIPs can route their traffic through a NAT instance to access the Internet. These instances use the EIP of the NAT instance to traverse the Internet. The NAT instance allows outbound communication but doesn’t enable machines on the Internet to initiate a connection to the privately addressed machines using NAT.
https://docs.aws.amazon.com/vpc/latest/userguide/VPC_NAT_Instance.html