An internet gateway allows communication between your VPC and the internet. To enable access to or from the internet for instances, you must attach an internet gateway to your VPC.
Go to AWS VPC dashboard
Internet Gateway->Create Internet Gateway-> Create
Now, attach it your VPC, so that your VPC has internet access to and fro.
If you are interested in AWS Certification, check out AWS Course by Intellipaat.