VPC let's you isolate your subnets, you can have multiple VPC depending on your requirements, As AWS documentations says, you can have your web server in a VPC which is exposed to internet and all DB servers in another VPC doesn't exposed to internet.
Reason i writing this post was i deleted my default VPC accidentally, so i want to create one which has same functionality similar to Default one, which mean instances in this VPC should be exposed to internet.
Please follow the below link from AWS to create a VPC , which have very good documentation.
Few things i just want to highlight,
1. Create a VPC.
2. Create a subnet under newly created VPC.
3. Create a Internet Gateway and attach it to new VPC.
4. Edit the route table and add an entry to allow all traffic via Internet Gateway to the outside world.
Thing i would like to highlight and make sure you don't miss and end up wasting time in troubleshooting.
1. After creating subnet, right click on the subnet and "Modify Auto-Assign Public IP"
2. Go to "Route Tables" and add entry to allow all traffic to outside world via Internet Gateway.
Unless you do this step you'll not access Instances from Outside world using public ip. What see is above route allows Instaces reach internet, if you don't add this entry, your request from outside world will reach the instance but they can't reply or acknowledge since traffic to outside world is not allowed via Internet Gateway.
I tested this using tcpdump, i see requests on the instances from outside world but instances can't talk back.
My intention is to expose the points that was documentation didn't do.