VPC

  • Amazon Virtual Private Cloud (Amazon VPC) enables you to launch Amazon Web Services (AWS) resources into a virtual network that you've defined.

  • VPC is a virtual network dedicated to your AWS account. It is logically isolated from other virtual networks in the AWS cloud

  • By VPC, we can have complete control over your virtual networking environment, including selection of your own IP address range, creation of subnets, and configuration of route tables and network gateway.

  • To protect the AWS resources in each subnet, you can use multiple layers of security, including security groups and network access control lists (ACL)

2 types of VPC

  1. 1. Default VPC

  2. Custom VPC (nondefault VPC)

Default VPC

  1. Default VPC is user friendly, allowing you to immediately deploy instances.

  2. If you have a default VPC and don't specify a subnet when you launch an instance, the instance is launched into your default VPC.

  3. All subnets in default VPC have an internet gateway attached.

  4. Each EC2 instance under VPC have private and public IP address.

  5. If you delete the default VPC only way to get it back is to contact AWS.

Custom VPC

  1. VPC which is created by the user according to the custom configuration is called custom VPC.

  2. Subnets that you create in your nondefault VPC and additional subnets that you create in your default VPC are called nondefault subnets.

Subnet

  • A subnet is a range of IP addresses in your VPC. You can launch AWS resources into a subnet that you select. We can use a public subnet for resources that must be connected to the Internet, and a private subnet for resources that won't be connected to the Internet.

Route table

  • A route table contains a set of rules, called routes, that are used to determine where network traffic is directed. Each subnet in our VPC must be associated with a route table, the table controls the routing for the subnet.

  • A subnet can only be associated with one route table at a time, but we can associate multiple subnets with the same route table.

Internet gateway

  • An Internet gateway is a horizontally scaled, redundant, and highly available VPC component that allows communication between instances in your VPC and the Internet.

  • An internet gateway provides a route out to the internet.

  • 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.

  • For a VPC you can have 1 internet gateway

Last updated