Understanding AWS Virtual Private Cloud Fundamentals

Understanding AWS Virtual Private Cloud Fundamentals

AWS VPC is like your personal section in the cloud. It's where you put your stuff, control who can access it, and ensure it's safe. Just like your own online room!

Important Words to Keep in Mind

  1. IP Address: It is like a digital home address for devices on the internet. It helps computers find and connect, just like your home address helps people find your house.

  2. Subnets: are like neighborhoods within a big city. They help organize devices in a network, making communication smoother and keeping things organized. Just as a city has different areas for different purposes, subnets help devices in a network work together effectively.

    There are two kinds of subnets:

    • Public Subnet: There are public subnets, which are like open areas accessible to everyone.

    • Private subnets: These are more secluded and private.

  3. NAT Gateway: NAT (Network Address Translation) is a technology that allows multiple devices in a private network to share a single public IP address when accessing the internet. It works like a translator, changing the private IP addresses of devices into a single public IP address that's used to communicate with websites and services on the internet. This helps protect the devices in the private network and conserves public IP addresses.

  4. Internet Gateway: It is like a door that connects your home network to the outside world, specifically the Internet. It helps your devices at home communicate with websites, apps, and other things on the internet. It's like a bridge that lets your devices step out into the virtual world.

  5. Routing table: It is like a map for your computer or network. It shows the different paths your data can take to reach its destination. It's similar to how you use a map to find the best route to a place – the routing table helps your data find the best way to get where it needs to go on the internet.

Getting the Hang of VPC

In an AWS VPC, there are Private and Public Subnets, NAT Gateway, Internet Gateway, and Routing Table – things we've already covered. Now, let's get practical and build our own VPC on AWS.

Types of VPC

  1. Default VPC: A Default VPC on AWS is like a ready-made neighborhood. It's a pre-set space that AWS gives you when you start using their services. It comes with common settings and is good for basic use. Think of it as a default home where you can quickly move in without setting up everything from scratch.

  2. Custom VPC: A Custom VPC on AWS is like building your own neighborhood. You get to design the layout, set up the rules, and choose how everything works. It's more tailored to your needs compared to the default setup. Think of it as creating your dream home from the ground up, with all the features you want.

Creating a VPC on AWS

  • Visit the VPC service in AWS and tap the "Create VPC" button.

  • Choose the "VPC-only" option and provide the name of your VPC. Additionally, pick the "IPv4 CIDR manual input" from the options below.

  • Choose an IPV4 CIDR that suits your needs and then click the "Create VPC" button.

  • Congratulations, your VPC is now successfully created!

    Next, we simply have to add subnets and gateways to it.

  • Now, go to the "Subnets" section under "Virtual Private Cloud." After that, click on "Create Subnet."

  • Choose the VPC where you want to create the subnet.

  • In the Subnet Settings, provide the subnet name and use the same IPv4 CIDR as the VPC.

  • Click on "Create Subnet," and you'll see the subnet is created and linked to your VPC.

  • Our final step is to generate an Internet Gateway. To do this, head to the "Internet Gateway" section in the VPC area. Then, click on the "Create Internet Gateway" button.

  • Creating an Internet Gateway is very simple. Just provide the Internet gateway name and click on "Create Internet gateway."

  • Once you've created the Internet gateway, attach it to the previously created VPC. With this step, your Internet gateway is now successfully set up.

This is the process of creating a VPC with subnets, Internet Gateways, and more. Now you can utilize this VPC when setting up EC2 instances and other resources.