1,234
edits
Changes
→Subnets
Your machines on your subnets can automatically connect to each other. They do not have access to the internet automatically.
== Public IPs ==
You can assign a public IP to one of your VMs. Since you don't own any: your only option here is to use an '''Elastic IP'''. These are owned by Amazon, and Amazon will let you use them for free.
Interestingly they're free when you use them, but cost money if you don't use them. That's because there's a limited pool of public IPv4 addresses, and once you request one of these addresses: noone else can use it. So you better use it, or pay for it. Since our VMs are going to be shut down most of the time: this is one of the costs that will come out of your 100$ credit.
Also note if you look inside a VM: the public IP isn't actually configured as the IP on that interface. The IP is assigned to your VPC, and incoming connections to it are port-forwarded to the VM which you assigned the IP to. This is very different from what you saw in your previous courses.
You may have configured port forwarding on your router at home at some point to enable some game or service which requires an open port on your public IP address. This is the same idea.
* Default dynamic public IP