May 2018
Intermediate to advanced
554 pages
13h 51m
English
To access your VPC network, you need to have a gateway that accesses it from the internet. Internet Gateway (IGW) is the one that connects the internet to your VPC.
Then, in the subnets under VPC, you can set the default route to go to IGW or not. If it routes to IGW, the subnet is classified as the public subnet. Then, you can assign the global IP address on the public subnet.
Let's configure the first subnet (192.168.0.0/24) as the public subnet that routes to IGW using the following steps:
$ aws ec2 create-internet-gateway{ "InternetGateway": { "Attachments": [], "InternetGatewayId": "igw-e50b849d", "Tags": [] }}
$ aws ec2 ...