Understanding the AWS VPC

Understanding the AWS VPC

What comes to mind when you hear the word VPC? I for one thought it was some sort of VPN-related app or somethingđŸ˜‚. Yeah I know it’s weird but that was honestly my thought. So this article addresses what you should know about a VPC and why it’s so important.

VPC stands for virtual private cloud, it is a private space that is created by a user within the AWS network with the main purpose of providing a level of isolation within the AWS public cloud. Think of it like you having privacy in your own house, by creating a private space only you own and have full control over ( your room ).
Do you get it now?

There are two types of VPC in AWS, there is the default VPC and the custom VPC.

Default VPC

When an Aws account is created it is assigned a default VPC. The default VPC automatically creates default subnets, route tables, internet gateway, and a default security group. A default VPC is not secure to ensure the security of your VPC it is advisable to use a custom VPC.

Custom VPC

A custom VPC is a VPC of your own making, unlike the default VPC you get to fully customize it to suit your use case. During creation you have complete control over your virtual networking environments, you get to choose your oo address range, the number of subnets you want, the configuration of your route tables, and your network gateways ( internet gateway and NAT gateway as the case may be)

Components of VPC

The VPC has a couple of components that make it what it is.
These components are:

Subnets

Subnets are subnetworks, a way of dividing the VPC CIDR range into little chunks to guarantee high availability. Subnets span availability zones and an Aws account can have up to 200 subnets per VPC. Subnets are generally divided into two types, the public, and the private subnet.

Public subnets

Public subnets are used for public-facing resources such as web servers. It allows internet access to resources within the public subnets.

Private subnets

Private subnets are used to secure important resources like database servers within the private subnet. They are not allocated public IP addresses hence they use NAT gateways to connect to the internet when they need to. Instances within these subnets are believed to be secure because they can only be accessed by specific resources within the VPC.

Nat gateway

The NAT gateway allows instances within your private subnet to connect to the internet. It only allows responses to requests that come from inside your private subnet.

Route table

A route table is a set of rules that tells the systems how to move packets around. Every default route table has rules that allow everything in its CIDR range. Internet gateway An Internet gateway is a VPC component that enables communication between the VPC and the internet. It is attached to the VPC to grant internet access.

Security Groups

Security groups are virtual firewalls that control incoming and outgoing traffic into the resources within your VPC. Just like name dictates inbound rules control incoming traffic and outbound control outgoing traffic.

Network access control list ( NACL )

Network access control lists are virtual firewalls that control incoming and outgoing traffic into and out of one or more subnets. It acts as an additional layer of security to your VPC.

Now the big question... Why is it so important? The AWS VPC is so important because it’s a secure, isolated private space you create within the public cloud ( eg AWS, Google, and the likes ) that allows you to run code, store data, host websites, and do anything else you can do in a public cloud but in a private space.

I hope this has helped you understand what a VPC is and why it’s so important. Thanks for reading.

Please like and share with a friend and you can also reach out to me via Linkedin or Twitter ... Until next time