AWS VPC - Private and Public Subnets

By Łukasz Kallas
Picture of the author
Published on
aws image

Amazon Web Services (AWS) provides a robust and flexible cloud infrastructure that allows you to create and manage your network using Virtual Private Cloud (VPC).

What is a VPC?

A Virtual Private Cloud (VPC) is a virtual network dedicated to your AWS account. It is logically isolated from other virtual networks in the AWS cloud, providing you with complete control over your networking environment. You can define your own IP address range, create subnets, configure route tables, and set up network gateways.

Key Components of VPC
  1. Subnets:
  • Public Subnets - Subnets with direct access to the internet via an Internet Gateway (IGW). Resources in a public subnet, such as web servers, can communicate directly with the internet and have a public IP address.
  • Private Subnets - Subnets without direct access to the internet. Resources in a private subnet, such as databases, do not have direct internet access and are typically accessed through other means like a VPN or NAT Gateway.
  1. Route Tables:

Route tables control the traffic routing within the VPC. You can associate route tables with subnets to direct traffic appropriately.

  1. Internet Gateway (IGW):

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

  1. NAT Gateway:

A NAT Gateway enables instances in a private subnet to connect to the internet or other AWS services, but prevents the internet from initiating connections with those instances.

Stay Tuned

Want to learn?
The best articles, links and news related to software development delivered once a week to your inbox.