[EC2-VPC] Check the route table for the subnet. You need a route that sends all traffic destined outside the VPC (0.0.0.0/0) to the Internet gateway for the VPC.
Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.
In the Description tab, write down the values of VPC ID and Subnet ID.
Open the Amazon VPC console at https://console.aws.amazon.com/vpc/.
In the navigation pane, click Internet Gateways. Verify that there is an Internet gateway attached to your VPC. Otherwise, click Create Internet Gateway and follow the directions to create an Internet gateway, select the Internet gateway, and then click Attach to VPC and follow the directions to attach it to your VPC.