10 AWS Networking Concepts Every Solutions Architect Should Understand

An application running on Amazon EC2 cannot connect to its database. Both resources are deployed in the same AWS Region, their instances appear healthy, and the database endpoint is correctly configured. Yet the application continues to report connection timeouts.
Where should a Solutions Architect investigate first?
The problem could involve a security group, subnet routing, network ACL, DNS configuration, or an application-level dependency. Adding a public IP address or opening additional firewall ports without understanding the cause might introduce security risks without fixing the problem.
This situation illustrates why AWS networking is a fundamental skill for cloud architects. A reliable architecture depends on more than connecting services; it requires carefully controlling how traffic flows between users, applications, databases, AWS services, and external networks.
Every AWS Solutions Architect should understand how VPCs, subnets, route tables, network security, DNS, load balancing, private connectivity, and monitoring work together to support secure and highly available applications.
These concepts are also relevant to the AWS Certified Solutions Architect – Associate (SAA-C03) examination, where networking requirements frequently appear within broader architectural scenarios.
In this guide, we'll explore ten essential AWS networking concepts, examine their practical applications, and explain common design trade-offs. You'll also complete a Python routing simulation and learn how to inspect an existing AWS network through read-only AWS CLI commands.
Why AWS Networking Matters for Solutions Architects
Consider a company hosting an online retail application.
Customers access the website through a public domain name. Requests reach an Application Load Balancer, which distributes traffic to application servers running in private subnets. Those servers communicate with a database and retrieve objects from Amazon S3.
A simplified architecture looks like this:
INTERNET USERS
|
Route 53 DNS
(name resolution)
|
v
APPLICATION LOAD BALANCER
/ \
/ \
Availability Zone A Availability Zone B
| |
Private App A Private App B
\ /
\ /
DATABASE TIER
Private Access
Supporting Network Components
-----------------------------
Route Tables
Security Groups and NACLs
VPC Endpoints
Monitoring and Logging
Figure 1: A simplified multi-AZ application. Route 53 resolves the application name; actual application traffic then follows the resolved network path.
Several architectural decisions are involved.
The load balancer needs an appropriate public-facing configuration. Application servers require secure communication with backend services, and databases should not be unnecessarily exposed to the internet.
The system must also tolerate suitable failure scenarios without allowing infrastructure costs to grow unpredictably.
Understanding the networking components behind these decisions is essential for designing reliable AWS solutions.
1. Amazon VPC, Subnets, and CIDR Addressing
Amazon Virtual Private Cloud (Amazon VPC) provides a logically isolated virtual network for AWS resources.
A VPC exists within one AWS Region and can contain subnets across multiple Availability Zones. Each subnet belongs to one Availability Zone.
Within a VPC, architects define address ranges, create subnets, configure routing, and apply networking security controls.
Understanding CIDR Blocks
Classless Inter-Domain Routing (CIDR) notation identifies an IP address range.
For example:
VPC CIDR: 10.20.0.0/16
This block includes 65,536 IPv4 addresses.
The VPC can be divided into smaller subnets based on application requirements.
Example Multi-AZ Subnet Design
| Subnet | CIDR | Purpose |
|---|---|---|
| Public A | 10.20.1.0/24 | Public-facing load balancer |
| Public B | 10.20.2.0/24 | Public-facing load balancer |
| Private App A | 10.20.11.0/24 | Application workloads |
| Private App B | 10.20.12.0/24 | Application workloads |
| Private Data A | 10.20.21.0/24 | Database resources |
| Private Data B | 10.20.22.0/24 | Database resources |
This design separates workloads according to their network access requirements and distributes resources across Availability Zones.
AWS Reserved IP Addresses
AWS reserves five IPv4 addresses from every standard VPC subnet CIDR block.
A /24 subnet contains 256 addresses, leaving 251 ordinarily available for assignment to resources.
The reserved addresses are the first four and the last address in the subnet.
This matters when estimating the number of network interfaces, EC2 instances, and other resources that a subnet must support.
Why CIDR Planning Matters
Suppose a company independently creates several VPCs with overlapping address ranges.
Later, it needs to establish private connectivity between them.
Overlapping IP ranges can complicate or prevent certain routing and peering configurations.
Amazon VPC IP Address Manager (IPAM) can help organizations plan and manage address allocations.
Architecture lesson: Design address ranges with future growth, multi-VPC connectivity, and hybrid networking in mind. Good CIDR planning prevents expensive redesigns.
Official reference: Amazon VPC Subnet CIDR Blocks.
2. Route Tables, Internet Gateways, and NAT Gateways
Routing determines which network path traffic follows when it leaves a subnet.
AWS route tables contain destination ranges and corresponding targets.
Targets may include local routing, internet gateways, NAT gateways, VPC peering connections, and Transit Gateways.
How Route Tables Work
Consider this simplified route table:
| Destination | Target |
|---|---|
| 10.20.0.0/16 | local |
| 0.0.0.0/0 | Internet Gateway |
Traffic destined for the VPC's local CIDR range uses the local route.
Other IPv4 destinations match the default route, unless a more specific applicable route exists.
AWS generally uses longest-prefix matching to identify the most specific destination, subject to additional route priority rules.
Public vs. Private Subnets
A subnet is considered public when its route table provides the relevant route to an internet gateway.
However, a public subnet does not automatically make every resource publicly reachable.
For direct IPv4 internet communication, an EC2 instance also needs suitable public addressing and security rules that permit the intended traffic.
A private subnet does not provide a direct route to an internet gateway.
Private workloads can still communicate with external services through other appropriately configured networking components.
Internet Gateway vs. NAT Gateway
| Feature | Internet Gateway | NAT Gateway |
|---|---|---|
| Primary function | Internet connectivity for eligible VPC resources | Network address translation |
| Common use | Internet-facing application resources | Outbound access from private workloads |
| Unsolicited inbound access | Possible when addressing, routing, and rules permit | Not provided through ordinary outbound NAT |
| Typical example | Public-facing load balancer | Private server downloading updates |
Zonal and Regional NAT Gateways
AWS supports both zonal and regional NAT gateway configurations.
A zonal NAT gateway operates in a selected Availability Zone. Traditional resilient designs commonly use a NAT gateway in each required Availability Zone so workloads do not depend on another zone's NAT infrastructure.
Regional NAT gateways provide a different option.
A regional NAT gateway can expand across Availability Zones as workloads are deployed, reducing the need to configure a separate NAT gateway for each zone.
Regional NAT gateways also do not require a public subnet to host the gateway.
However, regional and zonal NAT gateways differ in supported configurations. For example, regional NAT gateways do not support private NAT use cases.
Architects should evaluate availability, feature requirements, routing, and cost before choosing a deployment mode.
Practical Scenario
An application instance in a private subnet must download software updates from an external repository.
Appropriate NAT connectivity can enable that outbound traffic without assigning a public IPv4 address to the instance.
If the application only needs access to supported AWS services, a VPC endpoint may be a better alternative.
Architecture lesson: Determine whether traffic needs the public internet, another private network, or a supported AWS service before selecting a gateway.
Official reference: AWS Regional NAT Gateways.
3. Security Groups, Network ACLs, and Network Firewalls
AWS uses several controls to protect network communication.
Security groups, network access control lists, and AWS Network Firewall provide different forms of traffic control.
Understanding their differences is essential for designing secure cloud applications.
Security Groups
A security group acts as a virtual firewall associated with supported AWS resources and network interfaces.
Security groups are stateful and use allow rules.
For tracked connections, response traffic is generally permitted automatically.
A security group cannot contain an explicit deny rule.
Network ACLs
A network ACL applies inbound and outbound filtering rules at the subnet level.
NACLs are stateless, meaning inbound and outbound traffic are evaluated separately.
They can contain both allow and deny rules.
Rules are processed according to their assigned rule numbers.
Security Groups vs. NACLs
| Feature | Security Groups | Network ACLs |
|---|---|---|
| Scope | Supported resource/network interface | Subnet |
| Stateful | Yes | No |
| Allow rules | Yes | Yes |
| Deny rules | No | Yes |
| Rule evaluation | Combined applicable allow rules | Ordered rule numbers |
| Return traffic | Tracked response traffic generally allowed | Must satisfy rules |
Example: Protecting a Three-Tier Application
Suppose the application consists of an ALB, application servers, and a private database.
The security design might include these relationships:
| Component | Permitted Inbound Traffic |
|---|---|
| ALB | HTTPS from intended clients |
| Application servers | Application port from the ALB security group |
| Database | Required database port from the application security group |
The database does not need unrestricted access from the internet.
Using security group references can also avoid hardcoding individual application instance IP addresses.
AWS Network Firewall
AWS Network Firewall provides managed network traffic inspection and policy enforcement for supported architectures.
An organization may use it to inspect traffic between network segments or implement more advanced network security policies.
However, its protection depends on correct routing.
Traffic that bypasses the inspection endpoints cannot be inspected through that firewall path.
Common Security Mistakes
A frequent mistake is allowing SSH or other administrative access from 0.0.0.0/0 without an appropriate requirement and compensating protection.
Another is creating restrictive NACL rules while forgetting the return traffic needed for legitimate connections.
Architecture lesson: Use least-privilege security groups as a core access-control mechanism, understand subnet-level filtering, and add advanced inspection when justified by security requirements.
Official reference: AWS Security Groups.
4. VPC Endpoints and AWS PrivateLink
Applications running in private subnets often need access to services such as Amazon S3, DynamoDB, Secrets Manager, or other supported AWS APIs.
These requests do not always require a NAT gateway or internet gateway.
VPC endpoints provide private connectivity options.
Gateway VPC Endpoints
Gateway endpoints are commonly used for Amazon S3 and DynamoDB.
They work through route table associations and AWS-managed service prefix lists.
For example, a private EC2 workload can access an S3 bucket through an appropriately configured gateway endpoint.
This eliminates the need for a NAT gateway solely for supported S3 traffic from that VPC.
Interface VPC Endpoints
Interface endpoints use AWS PrivateLink.
They create endpoint network interfaces with private IP addresses in selected subnets.
They support private access to numerous AWS and other supported services.
Gateway vs. Interface Endpoints
| Feature | Gateway Endpoint | Interface Endpoint |
|---|---|---|
| Common use | S3 and DynamoDB | Supported service APIs and endpoint services |
| Network mechanism | Route table integration | Private endpoint interfaces |
| PrivateLink | No | Yes |
| Security groups | Not directly associated with gateway endpoint | Associated with endpoint interfaces |
| Typical pricing | No additional gateway endpoint charge | Endpoint and data processing charges may apply |
Example: Private Access to Amazon S3
Imagine an application that processes documents from an S3 bucket.
The EC2 instances run in private subnets.
A gateway endpoint for S3 can provide the service path without requiring a NAT gateway.
However, connectivity alone is insufficient.
The application also needs appropriate IAM authorization, relevant bucket and endpoint permissions, and applicable network controls.
An Important Limitation
An S3 gateway endpoint cannot simply be used as a shared service path from every connected network.
For example, on-premises networks and remote VPCs connected through a Transit Gateway cannot directly use a gateway endpoint in another VPC for S3 connectivity.
Those scenarios may require an interface endpoint or a different supported design.
Architecture lesson: Evaluate VPC endpoints before adding internet-based connectivity for AWS service access, but understand each endpoint type's routing and access limitations.
Official reference: Gateway Endpoints for Amazon S3.
5. Amazon Route 53, DNS, and Route 53 Resolver
DNS allows clients to resolve names into the information needed to reach services.
Amazon Route 53 provides managed DNS capabilities for public and private applications.
For Solutions Architects, DNS design affects application availability, traffic distribution, and hybrid connectivity.
Common Route 53 Routing Policies
| Policy | Typical Use |
|---|---|
| Simple | Basic DNS routing |
| Weighted | Select responses according to configured weights |
| Latency | Route based on AWS-measured latency considerations |
| Failover | Support primary and secondary routing |
| Geolocation | Respond according to DNS query location |
| Geoproximity | Influence responses based on location and bias |
| Multivalue Answer | Return multiple eligible values |
| IP-Based | Route using configured client IP ranges |
Example: Multi-Region Application
Suppose a company deploys an application in two AWS Regions.
Latency-based routing can help Route 53 select responses associated with favorable network latency.
However, DNS routing does not guarantee that every user reaches the fastest application endpoint.
DNS caching, health, network conditions, and application performance all affect the actual experience.
Public and Private Hosted Zones
A public hosted zone contains records intended for public DNS resolution.
A private hosted zone supports DNS resolution in associated VPC environments.
For example, an organization may use a private hosted zone for an internal application name that should only resolve in approved VPCs.
Route 53 Resolver
Route 53 Resolver supports DNS resolution in VPC environments.
Resolver inbound and outbound endpoints can help integrate DNS between AWS and on-premises systems.
An inbound endpoint can support DNS queries originating from on-premises networks.
An outbound endpoint can forward selected queries toward configured external DNS servers.
DNS Troubleshooting Scenario
An EC2 instance can reach a service using an IP address but cannot reach it by hostname.
This suggests examining name resolution before changing unrelated network routes.
An architect should inspect the intended hosted zone, DNS settings, Resolver rules, and the actual response returned to the client.
Architecture lesson: Treat DNS as a critical dependency of application availability, not merely a naming convenience.
6. Elastic Load Balancing and Traffic Distribution
Load balancing distributes incoming connections or application requests across suitable targets.
It helps applications scale and reduces dependence on a single server.
AWS Elastic Load Balancing provides several load balancer types for different networking requirements.
Main AWS Load Balancer Types
| Load Balancer | Focus | Typical Use |
|---|---|---|
| Application Load Balancer | Layer 7 HTTP/HTTPS | Web applications and API routing |
| Network Load Balancer | Layer 4 connections | TCP, UDP, and supported TLS workloads |
| Gateway Load Balancer | Network appliance integration | Firewall and inspection appliances |
| Classic Load Balancer | Legacy workloads | Existing legacy applications |
Application Load Balancer
An Application Load Balancer supports application-layer routing.
It can direct requests based on conditions such as hostnames or URL paths.
For example:
example.com/products -> Product Service
example.com/orders -> Order Service
example.com/accounts -> Account Service
This is useful for applications containing multiple services.
Network Load Balancer
A Network Load Balancer supports high-performance network traffic across protocols such as TCP and UDP.
It may be appropriate when the application requires Layer 4 behavior or specific networking features.
However, choosing an NLB is not automatically better than choosing an ALB.
The decision depends on protocol requirements, traffic behavior, security, target types, and operational needs.
Gateway Load Balancer
Gateway Load Balancer supports traffic distribution to compatible virtual network appliances.
A company may use it with supported firewall appliances to build a scalable inspection architecture.
Why Health Checks Matter
A load balancer needs information about target health.
Health checks determine whether targets meet defined conditions.
However, a successful health check does not guarantee that every important application dependency is functioning.
For example, a web server may return HTTP 200 from a health endpoint even when a critical database operation is failing.
Health checks should therefore reflect meaningful application readiness.
Architecture lesson: Select load balancing services according to application protocols, routing needs, availability, and health-check requirements.
7. VPC Peering, Transit Gateway, and AWS Cloud WAN
Organizations often use multiple VPCs to separate applications, environments, departments, or AWS accounts.
These networks may still need controlled communication.
AWS provides several connectivity options, including VPC peering, Transit Gateway, and Cloud WAN.
VPC Peering
VPC peering connects two supported VPCs through private networking.
It can be useful for direct communication between a limited number of VPCs.
However, peering is not transitive.
Consider:
VPC A <----> VPC B <----> VPC C
Even when A is peered with B and B is peered with C, A cannot automatically reach C through B.
AWS Transit Gateway
Transit Gateway supports a central transit architecture.
Multiple VPCs and supported hybrid connectivity resources can attach to it.
With suitable route tables and configuration, Transit Gateway can provide connectivity across multiple attached networks.
AWS Cloud WAN
Cloud WAN supports managed global networking arrangements based on network policies and segmentation.
It can help organizations manage connectivity across Regions, accounts, and enterprise environments.
Connectivity Options Compared
| Feature | VPC Peering | Transit Gateway | Cloud WAN |
|---|---|---|---|
| Main model | Direct connection | Central transit hub | Managed global network |
| Transit routing | Not supported through peering alone | Supported through configuration | Policy- and topology-dependent |
| Common environment | Limited direct connections | Multi-VPC and hybrid networks | Large multi-Region networks |
| Operational concern | Multiple peering relationships | Attachments and route tables | Network policies and segmentation |
Example: Separating Development and Production
A company has separate development and production VPCs.
Both environments require access to selected shared services.
Transit Gateway route tables can support controlled connectivity while keeping other paths isolated.
However, attachments alone do not establish the intended security boundaries.
Routing and other access controls must be configured correctly.
Architecture lesson: Choose multi-VPC connectivity based on topology, scale, routing requirements, segmentation, and cost.
8. AWS Site-to-Site VPN and Direct Connect
Hybrid cloud architectures connect AWS resources with on-premises infrastructure.
Organizations may need access to internal databases, enterprise applications, or private networks that cannot be moved immediately.
Two important connectivity options are AWS Site-to-Site VPN and AWS Direct Connect.
AWS Site-to-Site VPN
Site-to-Site VPN provides encrypted IPsec connectivity between supported customer networks and AWS.
A standard VPN connection includes two tunnels for resilience.
Depending on the design, routing may use static routes or supported dynamic routing such as BGP.
AWS Direct Connect
Direct Connect provides dedicated connectivity between an organization's network and AWS through supported connection locations.
It may be useful for organizations with consistent hybrid network traffic and particular connectivity requirements.
A critical security distinction is that Direct Connect should not be treated as automatically providing end-to-end encryption for customer traffic.
Organizations needing encryption should evaluate supported MACsec, VPN over Direct Connect, TLS, and other suitable protections.
VPN vs. Direct Connect
| Feature | Site-to-Site VPN | Direct Connect |
|---|---|---|
| Connection | IPsec VPN | Dedicated connectivity |
| Encryption | IPsec | Additional end-to-end protection may be required |
| Setup | VPN configuration and compatible gateway | Connection, location, and provider considerations |
| Common use | Secure hybrid access | Ongoing enterprise connectivity |
| Resilience | Multiple tunnels and appropriate routing | Redundant connections and suitable routing |
Example: Hybrid Financial Application
A financial organization keeps a database in its data center while hosting an application in AWS.
The architect must consider connectivity reliability, encryption, routing, bandwidth, latency, and recovery procedures.
Direct Connect may provide the primary connection, while a separate VPN path may support a resilience strategy.
However, adding multiple connections does not automatically guarantee high availability.
The architecture must account for physical diversity and shared dependencies.
Architecture lesson: Hybrid networking requires a complete connectivity and recovery design, not just a connection between two endpoints.
Official reference: Encryption in AWS Direct Connect.
9. IPv6, Dual-Stack Networking, and Egress-Only Internet Gateways
IPv6 uses 128-bit addressing and provides a much larger address space than IPv4.
AWS supports IPv6 and dual-stack networking in compatible VPC configurations.
A dual-stack workload can use IPv4 and IPv6 where supported.
IPv4 vs. IPv6
| Concept | IPv4 | IPv6 |
|---|---|---|
| Address length | 32 bits | 128 bits |
| Example | 10.20.1.10 | 2001:db8:1234:1::10 |
| VPC support | Yes | Yes |
| Default internet route | 0.0.0.0/0 |
::/0 |
| Outbound-only internet design | Often NAT-based | Egress-only Internet Gateway |
Egress-Only Internet Gateway
An egress-only internet gateway supports outbound IPv6 communication from eligible VPC resources.
It prevents unsolicited inbound IPv6 connections through the gateway.
A route table may contain:
Destination: ::/0
Target: Egress-Only Internet Gateway
This is different from using a NAT gateway for private IPv4 workloads.
What Are DNS64 and NAT64?
Some IPv6-only workloads still need access to IPv4-only destinations.
DNS64 and NAT64 can support these interoperability scenarios when appropriately configured.
DNS64 synthesizes suitable IPv6 DNS responses based on eligible IPv4 records.
NAT64 translates traffic between IPv6 and IPv4 in supported environments.
Common IPv6 Mistakes
A frequent mistake is enabling IPv6 on a resource without reviewing routes or security group rules.
Another is assuming that IPv6 always requires the same NAT configuration as private IPv4 networking.
Architects should evaluate addressing, routing, application compatibility, and security for both protocol families.
Architecture lesson: IPv6 changes the addressing and connectivity model, so review both routing and security rather than copying IPv4 assumptions.
Official reference: AWS Egress-Only Internet Gateways.
10. VPC Flow Logs, Reachability Analyzer, and Network Monitoring
A reliable architecture must be observable.
Solutions Architects need ways to determine whether network communication is permitted, whether traffic is reaching the expected resources, and what has changed during an incident.
AWS provides several tools for these purposes.
Amazon VPC Flow Logs
VPC Flow Logs capture metadata about IP traffic associated with supported VPC networking resources.
Records may include source and destination addresses, ports, protocols, and actions.
However, VPC Flow Logs do not provide full packet payload captures.
AWS Reachability Analyzer
Reachability Analyzer examines AWS networking configuration to determine whether a supported network path should be reachable.
For example, it can help identify a route or network security rule that prevents communication between two supported resources.
However, Reachability Analyzer uses static configuration analysis.
It does not send packets or prove that the application itself is functioning.
Network Access Analyzer
Network Access Analyzer evaluates network configurations against defined access conditions.
An organization might use it to investigate whether sensitive resources have unintended network paths.
This can support security reviews and network governance.
Network Monitoring Tools Compared
| Tool | Main Use | Limitation |
|---|---|---|
| VPC Flow Logs | Inspect flow metadata | No complete packet payloads |
| Reachability Analyzer | Analyze network reachability configuration | Does not test application health |
| Network Access Analyzer | Evaluate access conditions | Based on static configuration |
| CloudWatch | Metrics, logs, and alerts | Depends on configured telemetry |
| CloudTrail | Record supported AWS API activity | Not a replacement for network traffic monitoring |
| VPC Traffic Mirroring | Copy selected network traffic | Requires supported analysis infrastructure |
Example: Application Cannot Reach a Database
Suppose application servers and a database are deployed in private subnets.
The application reports a connection timeout.
A systematic investigation should confirm the intended source, destination, port, and protocol.
Next, inspect the application and database security groups, network ACLs, and route configuration.
Reachability Analyzer can help determine whether the supported network path is valid according to the current configuration.
Flow Logs may provide relevant connection metadata.
If the network path appears valid, investigate DNS, database availability, authentication, and application configuration.
Architecture lesson: Different monitoring tools provide different evidence. Choose the tool according to the question you're trying to answer.
Official reference: AWS Reachability Analyzer.
Quick Reference: The 10 AWS Networking Concepts
| No. | Concept | Main Architectural Decision |
|---|---|---|
| 1 | VPC and Subnets | How to organize private network address space |
| 2 | Routing and NAT | How traffic reaches other destinations |
| 3 | Network Security | Which connections are allowed |
| 4 | VPC Endpoints | How workloads access supported services privately |
| 5 | Route 53 and DNS | How names resolve and responses are selected |
| 6 | Load Balancing | How traffic reaches healthy application targets |
| 7 | Multi-VPC Connectivity | How separate cloud networks communicate |
| 8 | Hybrid Connectivity | How AWS connects with external infrastructure |
| 9 | IPv6 Networking | How modern IP connectivity is implemented |
| 10 | Network Monitoring | How connectivity and access are investigated |
The real architectural skill is combining these concepts rather than treating them as independent services.
Hands-On AWS Networking Lab: Understand Routing and Inspect a VPC
Let's put the routing concepts into practice.
This lab has two parts.
First, you'll use Python to simulate route selection through longest-prefix matching.
Then, if you have access to an authorized AWS account, you'll use read-only AWS CLI commands to inspect an existing VPC.
The Python exercise runs locally and does not create cloud resources.
Part A: Simulate IPv4 Route Selection With Python
Consider a network with this VPC address range:
10.40.0.0/16
The following simplified routes are configured:
| Destination | Target |
|---|---|
| 10.40.0.0/16 | local |
| 10.100.0.0/16 | transit-gateway |
| 0.0.0.0/0 | nat-gateway |
The objective is to determine which route applies to each destination address.
Step 1: Create the Python Script
Create a file named aws_route_lab.py.
Add:
from ipaddress import ip_address, ip_network
routes = [
("10.40.0.0/16", "local"),
("10.100.0.0/16", "transit-gateway"),
("0.0.0.0/0", "nat-gateway"),
]
destinations = [
"10.40.12.5",
"10.100.2.9",
"1.1.1.1",
]
def select_route(destination):
destination_ip = ip_address(destination)
matches = [
(ip_network(cidr), target)
for cidr, target in routes
if destination_ip in ip_network(cidr)
]
if not matches:
return "no matching route"
best_match = max(
matches,
key=lambda item: item[0].prefixlen
)
return best_match[1]
for destination in destinations:
print(
f"{destination} -> "
f"{select_route(destination)}"
)
The script uses Python's built-in ipaddress module.
It compares each destination with the configured route ranges and selects the longest matching prefix.
Step 2: Run the Script
In your terminal, execute:
python3 aws_route_lab.py
If your system uses python for Python 3, that command may be used instead.
Step 3: Review the Output
Expected output:
10.40.12.5 -> local
10.100.2.9 -> transit-gateway
1.1.1.1 -> nat-gateway
The first destination belongs to the VPC's local address range.
The second matches the route toward the Transit Gateway.
The third matches the default IPv4 route.
This demonstrates the basic idea behind longest-prefix matching.
What the Simulation Does Not Test
This script is not an AWS network connectivity test.
Actual VPC communication also depends on route state, gateway configuration, return paths, network security, permissions, supported resource connectivity, and other routing rules.
For example, selecting a Transit Gateway route does not prove that the destination VPC is reachable.
The required attachments and transit routing must also be configured.
Part B: Inspect an Existing AWS VPC
For the next exercise, you'll need AWS CLI installed and an authorized AWS account with suitable read-only permissions.
The commands below do not create or modify AWS infrastructure.
Step 1: Confirm Your Identity and Region
Run:
aws sts get-caller-identity
Verify that the account is the one you intend to inspect.
Then review the CLI configuration:
aws configure list
For the following examples, explicitly choose a Region:
REGION="us-east-1"
Replace the value with the Region containing the VPC you're authorized to inspect.
Step 2: List VPCs
Run:
aws ec2 describe-vpcs \
--region "$REGION" \
--query "Vpcs[*].[VpcId,CidrBlock]" \
--output table
Review the VPC identifiers and CIDR ranges.
Select the VPC you want to analyze.
Step 3: Set the VPC ID
Define the selected VPC identifier:
VPC_ID="vpc-xxxxxxxxxxxxxxxxx"
Replace the placeholder with an actual authorized VPC ID.
Step 4: Inspect Subnets
Run:
aws ec2 describe-subnets \
--region "$REGION" \
--filters "Name=vpc-id,Values=$VPC_ID" \
--query \
"Subnets[*].[SubnetId,CidrBlock,AvailabilityZone]" \
--output table
Check how many subnets are present.
Identify their CIDR ranges and Availability Zone placement.
Consider whether address allocation and subnet distribution support the intended application architecture.
Step 5: Inspect Route Tables
Run:
aws ec2 describe-route-tables \
--region "$REGION" \
--filters "Name=vpc-id,Values=$VPC_ID" \
--output json
Review the route entries and route table associations.
Look for targets involving local routes, internet gateways, NAT gateways, Transit Gateways, and VPC endpoints.
Also identify the main route table and any explicit subnet associations.
Step 6: Review Security Groups
Run:
aws ec2 describe-security-groups \
--region "$REGION" \
--filters "Name=vpc-id,Values=$VPC_ID" \
--output json
Examine inbound and outbound permissions.
Determine whether the access rules appear consistent with the known purpose of the resources.
Do not change any permissions as part of this read-only exercise.
Step 7: Review VPC Endpoints
Run:
aws ec2 describe-vpc-endpoints \
--region "$REGION" \
--filters "Name=vpc-id,Values=$VPC_ID" \
--query \
"VpcEndpoints[*].[VpcEndpointId,VpcEndpointType,ServiceName]" \
--output table
This helps identify supported private connectivity configurations.
Consider whether gateway or interface endpoints are present and which services they support.
Step 8: Document the Architecture
Create a short architecture review using these questions:
| Question | Evidence |
|---|---|
| What is the VPC CIDR? | VPC configuration |
| Which Availability Zones are used? | Subnet configuration |
| Are CIDR ranges appropriately separated? | Subnet inventory |
| Which subnets have internet-facing routes? | Route tables |
| How is outbound access provided? | NAT or other routes |
| Which connections are permitted? | Security groups and relevant controls |
| Are VPC endpoints present? | Endpoint inventory |
| What could fail during an AZ outage? | Resource placement and dependencies |
These questions help build a habit of evaluating infrastructure before proposing changes.
Lab Summary
The Python simulation demonstrates route selection, while the AWS CLI exercise introduces real infrastructure inspection.
Together, they develop important Solutions Architect skills: understanding traffic destinations, reading routing information, interpreting security controls, and identifying architecture dependencies.
The local Python example has been tested with its stated sample inputs. The AWS CLI commands are illustrative and have not been executed against a live AWS account here.
Real-World Architecture: A Secure Multi-AZ AWS Web Application
Consider an online retailer designing a web application with these requirements:
- Customers must access the application through HTTPS.
- Application servers should remain private.
- The database should not be publicly exposed.
- The application must tolerate an Availability Zone failure where the supported design permits.
- Application servers need access to Amazon S3.
- The organization must monitor network communication and failures.
Proposed Architecture
CUSTOMERS
|
Route 53
DNS Resolution
|
v
INTERNET-FACING ALB
/ \
/ \
Public Subnet A Public Subnet B
| |
v v
App Tier A App Tier B
Private Subnet A Private Subnet B
\ /
\ /
DATABASE TIER
Private Subnets
|
AWS SERVICE ACCESS
S3 VPC Endpoint
The diagram is simplified. The database, endpoint routing, load balancer, and failure-recovery configuration must be implemented according to the selected AWS services.
Architecture Decisions
| Requirement | Possible Solution |
|---|---|
| Public HTTPS endpoint | Application Load Balancer |
| DNS | Route 53 |
| Application availability | Workloads across suitable Availability Zones |
| Private application tier | Private subnets |
| Restricted database communication | Appropriate database security group |
| Private S3 access | Gateway VPC endpoint |
| External API connectivity | Appropriate NAT arrangement |
| Monitoring | CloudWatch and VPC Flow Logs |
| Network path analysis | Reachability Analyzer |
Why This Design Is More Secure
The application and database tiers do not need public IPv4 addresses simply because customers access the application over the internet.
The load balancer provides the public entry point, while security groups restrict communication between the application layers.
VPC endpoints can reduce the need for general internet connectivity when accessing supported AWS services.
However, network separation alone does not provide complete security.
The application still requires identity controls, data protection, secure software configuration, monitoring, and controlled administration.
What Happens If One Availability Zone Fails?
If appropriately configured, healthy application resources in another Availability Zone can continue handling requests.
However, this depends on sufficient remaining capacity, load balancer configuration, application design, and database recovery capabilities.
A multi-AZ network design does not automatically make every application highly available.
Key architectural lesson: Reliability is achieved through the complete architecture, not simply by selecting a load balancer or deploying resources in two subnets.
Six-Week AWS Networking Learning Roadmap
Candidates developing AWS Solutions Architect networking skills can use a structured study schedule.
| Week | Focus | Practical Activity |
|---|---|---|
| 1 | VPC and CIDR | Plan a multi-AZ VPC |
| 2 | Routing and security | Compare gateways, security groups, and NACLs |
| 3 | DNS and load balancing | Design an ALB and Route 53 architecture |
| 4 | Private and multi-VPC connectivity | Evaluate endpoints, peering, and Transit Gateway |
| 5 | Hybrid networking and IPv6 | Compare VPN, Direct Connect, and IPv6 routes |
| 6 | Monitoring and review | Inspect VPC configurations and troubleshoot scenarios |
A useful daily study routine is to spend time reviewing AWS documentation, drawing architecture diagrams, completing small labs, and explaining why each networking component is needed.
Candidates without strong networking fundamentals may need additional time for CIDR calculations, routing, DNS, TCP/UDP, and network access controls.
Common AWS Networking Mistakes
Several design mistakes appear repeatedly in cloud networking projects.
Overlapping VPC CIDR blocks: These can complicate future connectivity and network expansion.
Assuming a public subnet makes resources public: Internet reachability also depends on addressing, routing, and access controls.
Using NAT for every AWS service request: Suitable VPC endpoints may provide a more appropriate service connection.
Confusing security groups with NACLs: Stateful and stateless filtering behave differently.
Assuming VPC peering is transitive: Separate peering connections do not create an automatic transit network.
Treating Direct Connect as automatically encrypted end to end: Additional security controls may be required.
Ignoring IPv6 access rules: Dual-stack resources need appropriate routing and security consideration for both address families.
Misinterpreting Reachability Analyzer: Static network reachability analysis cannot confirm that an application process is healthy.
The best way to avoid these mistakes is to evaluate the traffic path, security requirements, operational dependencies, and costs before deploying infrastructure.
How to Evaluate an AWS Network Like a Solutions Architect
Before approving a network architecture, ask whether the design satisfies the actual business requirements.
Start with the traffic flows.
Which systems need to communicate, which connections should be blocked, and where should the public entry points exist?
Next, consider resilience.
What happens when an Availability Zone or network component becomes unavailable?
Then evaluate security, operational visibility, and cost.
For example, a centralized network design may simplify certain policy controls while introducing additional routing complexity and shared dependencies.
The right architecture is not necessarily the design with the most AWS services.
It is the design that meets security, availability, performance, operational, and cost requirements with justified complexity.
Frequently Asked Questions
1. What AWS Networking Concepts Should Solutions Architects Learn First?
Start with Amazon VPC, CIDR ranges, subnets, routing, internet gateways, NAT gateways, security groups, and network ACLs. Then study DNS, load balancing, VPC endpoints, multi-VPC connectivity, IPv6, and monitoring.
2. What Is the Difference Between Public and Private Subnets?
A public subnet has an appropriate route to an internet gateway. A private subnet does not have a direct internet gateway route for the relevant traffic. However, internet reachability also depends on addressing, resource configuration, and security controls.
3. What Is the Difference Between a NAT Gateway and a VPC Endpoint?
A NAT gateway provides network address translation, commonly for outbound traffic from private workloads. A VPC endpoint provides private connectivity to supported services or resources. The endpoint type determines its capabilities, routing behavior, and costs.
4. Is VPC Peering Better Than Transit Gateway?
Neither is universally better. Peering can be suitable for direct connectivity between a limited number of VPCs. Transit Gateway supports broader transit networking and can simplify some multi-VPC architectures. The best choice depends on connectivity requirements, scale, routing, and cost.
5. How Important Is AWS Networking for SAA-C03?
Networking is an important part of AWS Certified Solutions Architect – Associate preparation. Candidates should understand how network design affects security, resilience, application connectivity, performance, and cost across different AWS services.
Conclusion: AWS Networking Is About Making the Right Architecture Decisions
AWS networking is a fundamental part of cloud solution design.
Amazon VPC and subnetting establish the network structure. Route tables and gateways determine where traffic travels, while security groups and network ACLs control permitted communication.
VPC endpoints provide private access to supported services, Route 53 supports DNS, and Elastic Load Balancing distributes traffic to application targets.
VPC peering, Transit Gateway, and Cloud WAN address communication between separate AWS networks. Site-to-Site VPN and Direct Connect support hybrid environments, while IPv6 provides additional addressing and connectivity options.
Finally, tools such as VPC Flow Logs and Reachability Analyzer help architects investigate networking behavior.
The Python routing lab demonstrates why route selection matters, and the AWS CLI walkthrough provides a practical way to inspect networking configurations.
For Solutions Architects, however, understanding these services individually is only the beginning.
The more valuable skill is recognizing how they interact within a complete application architecture.
A strong AWS Solutions Architect should be able to explain which networking service is appropriate, why it solves the requirement, which limitations it introduces, and how the resulting design balances security, availability, performance, and cost.
Continue practicing with realistic architecture scenarios, read official AWS documentation, and evaluate the results of every design decision.
That approach develops useful cloud engineering skills while supporting preparation for AWS Certified Solutions Architect – Associate.
Official AWS References
About the author
- I'm David Mercer, a cloud architecture specialist with 10+ years in enterprise IT. I focus on Azure, AWS, and Google Cloud, explaining complex concepts through practical examples and clear certification guidance. I also share educational content through my work with Cert Mage.
Comments
Join the discussionYour point about CIDR planning really stood out. Teams often pick overlapping ranges for separate VPCs and only discover the problem when they try to peer them, by which time renumbering is painful. I also appreciated the warning that Direct Connect should not be treated as automatically encrypted, since that assumption is easy to make when the connection feels private. The reminder that a passing health check does not prove the application itself is healthy is a useful check for anyone reviewing a load balancer design.

