AWS Subnets

AWS Subnets are segmented sections within an Amazon Virtual Private Cloud (VPC). They partition the IP address range of a VPC, allowing further segregation of resources and providing a way to organize and manage network traffic within the VPC.

Subnets are associated with specific availability zones (AZs) within an AWS region and can be public or private to organize and secure network traffic:

  • Public subnets: have a route to the Internet via an Internet gateway and assign public IP addresses to their instances making it possible for instances to send and receive traffic from the Internet directly.
  • Private subnets: typically do not have direct internet access and are used for resources that should not be publicly accessible. A NAT device is needed to access the Internet (e.g. for software update downloads).

AWS regions are separate geographic areas where AWS maintains multiple data centers called availability zones (AZs). Availability zones within a region are isolated from each other in terms of infrastructure to enhance fault tolerance and stability. These zones are interconnected but operate independently, providing redundancy and resilience against failures.

The diagram below corresponds to the tutorial AWS with Terraform: The Essential Guide – AWS Subnets and shows us-east-1 region with some of its availability zones.

AWS Subnets in multiple Public and Private Availability Zones in us-east-1 region

AWS subnets are closely tied to availability zones (AZs) within a region. Each subnet is associated with a specific availability zone. When creating a subnet, specify the availability zone in which that subnet resides.

This linkage between subnets and availability zones allows:

  • High Availability: Placing subnets in different availability zones enables redundancy and fault tolerance. If one availability zone experiences issues, resources in subnets associated with other availability zones can remain unaffected.
  • Low Latency: Placing resources in subnets within the same availability zone can minimize latency and increase performance as communication within the same AZ typically has lower latency than across different AZs.
  • Optimized Networking: AWS services can automatically distribute traffic across availability zones when subnets are used in conjunction with services like load balancers, ensuring balanced and efficient resource utilization.

Subnets in different availability zones provide a foundational architecture for fault tolerance, performance optimization, and reliable connectivity within an AWS region.

Leave a Reply

Your email address will not be published. Required fields are marked *


Related Cloud Tutorials

Control traffic to AWS resources using security groups
How to configure and use the Terraform aws_security_group and aws_security_group_rule resource blocks to create and manage AWS Security Groups and secure the infrastructure.
AWS Routing Tables with Terraform
How to configure and use the Terraform aws_route_table, aws_route, and aws_main_route_table_association resource blocks to create and manage AWS Routing Tables.
AWS NAT Gateway
How to configure and use the Terraform aws_nat_gateway and aws_eip resource blocks to create and manage AWS NAT Gateway and its corresponding Public IPs inside each availability zone to enable Internet access from instances in private subnets.
An AWS NAT Gateway is a managed service that allows instances in a private subnet to connect to the Internet while keeping them secure. It provides network address translation (NAT) for outbound traffic, allowing resources in a private subnet to access the internet while maintaining a private IP address.
AWS Internet Gateway
How to configure and use the Terraform aws_internet_gateway resource block to create and manage AWS Internet Gateway inside a VPC to enable instances access to and from the Internet.
Javier Ruiz Cloud and SaaS Expert

Javier Ruiz

IT Wonder Lab tutorials are based on the diverse experience of Javier Ruiz, who founded and bootstrapped a SaaS company in the energy sector. His company, later acquired by a NASDAQ traded company, managed over €2 billion per year of electricity for prominent energy producers across Europe and America. Javier has over 25 years of experience in building and managing IT companies, developing cloud infrastructure, leading cross-functional teams, and transitioning his own company from on-premises, consulting, and custom software development to a successful SaaS model that scaled globally.

Are you looking for cloud automation best practices tailored to your company?

linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram