Follow these steps:
First, create an internet gateway and attach it to your VPC.
Next, configure the internet gateway to route traffic to and from the internet:
- Add an entry to the routing table for your subnet that points to your internet gateway.
- Confirm your VPC's security groups and network access control list (ACL) allow traffic to and from the internet. For example configurations for network ACLs, see Recommended Network ACL Rules for Your VPC.
- Confirm that any instances that route traffic through the internet gateway have a public IP address or an attached Elastic IP address.
- If you're creating a new Elastic Load Balancer, choose an Internet-facing load balancer.