How do I create and attach an internet gateway to a VPC?
Last updated: 2022-09-27
How do I allow resources in a VPC to communicate with the internet by creating and attaching an internet gateway to the VPC?
For the resources in a VPC to send and receive traffic from the internet, make sure that the following are true:
- An internet gateway must be attached to the VPC.
- The route tables associated with your public subnet (including custom route tables) must have a route to the internet gateway.
- The security groups and network access control lists (ACL) associated with your VPC must allow traffic to flow to and from the internet.
- Resources in your subnet must have a public IP address or an attached Elastic IP address.
For more information on instructions for each of these steps, see connect to the internet using an internet gateway.