- Nikhil Bhaskar
- May 13, 2022
How to Create Internet Gateway on Amazon Web Services(AWS).
An internet gateway is a horizontally scaled, redundant, and highly available VPC component that allows communication between your VPC and the internet. An internet gateway supports IPv4 and IPv6 traffic.It does not cause availability risks or bandwidth constraints on your network traffic.
An internet gateway serves two purposes: to provide a target in your VPC route tables for internet-routable traffic, and to perform network address translation (NAT) for instances that have been assigned public IPv4 addresses.
- Login to aws portal.
- Click on Services.
- Under Networking & Content Delivery select VPC.
- Click on Internet Gateways.
- Click on Create Internet gateway.
- Provide internet gateway tag name.
- Click on Create internet gateway.
- After sometime internet gateway is ready.
- Click on Actions.
- Select attach to VPC option.
Create Internet Gateway using Shell
- Setup aws-cli on your system so click on link https://www.hackerxone.com/blog/how-install-configure-aws-cli-ubuntu-1804
- Run the following command:
To create an internet gateway, use the following command:
aws ec2 create-internet-gateway
To add a tag to the internet gateway
aws ec2 create-tags –resources internet-gateway-id –tags Key=<tag-key>,Value=<tag-value>
To attach the internet gateway to the VPC
aws ec2 attach-internet-gateway –internet-gateway-id internet-gateway-id –vpc-id vpc-id