Amazon Virtual Private Cloud
Updated: Jun 16, 2020
A quick summary view of Amazon VPC and its components. This representation may be easier to remember before going to exam.

Amazon Virtual Private Cloud (VPC) is a proprietary cloud services of Amazon. The VPC resembles a traditional data center with various services offered on the cloud.
A VPC region is a geographical location where your data center is present.
A VPC must be created in a single region and it cannot span regions.
An Availability Zone is a distinct location within a region that provides low-latency network connectivity to other AZs in the same region.
VPC High Level Architecture
Following diagram shows the architecture of a typical virtual private cloud and how components are connected.

Subnet
A VPC is broadly divided into Subnets.
A subnet defines the IP range of your VPC.
In general, there should be a minimum of 2 subnets in a VPC.
EC2 instances are always launched in a subnet under a VPC.
In the below diagram, the subnets have been highlighted in green.

Route Table
A Route table defines the rules for routing the traffic in and out of the instances in the subnet.
By default, all routing rules are set to only local destination. One should add a new route to the desired destination.
It is always recommended to have a separate route table for private and public subnets.
In the below diagram, the route tables have been highlighted in green.

Internet Gateway
This is the main gateway that allows communication between your VPC and the Internet.
A VPC needs to be attached to an Internet Gateway in order to enable the communication
A new route need to be added with destination as IGW in order to allow instances in a subnet to communicate with Internet
In the below diagram, the internet gateway has been highlighted in green.
