Module 2 - Networking On AWS - Animated
Module 2 - Networking On AWS - Animated
© 2022,
2021, Amazon Web Services, Inc. or its Affiliates.
Regions and Availability Zones (AZs)
AWS Cloud
AZ us-east-1c AZ us-west-c
© 2022,
2021, Amazon Web Services, Inc. or its Affiliates.
AWS VPC - Overview
AWS Cloud
Account 123456789
Region US-EAST-1
© 2022,
2021, Amazon Web Services, Inc. or its Affiliates.
Subnets and AZs
Region us-east-1
VPC 10.0.0.0/16
EC2 Instances
Amazon RDS
instance
© 2022,
2021, Amazon Web Services, Inc. or its Affiliates.
AZ ID
© 2022,
2021, Amazon Web Services, Inc. or its Affiliates.
Route Tables – Internal VPC Traffic
VPC 10.0.0.0/16
Route Table 1 - Rules
Subnet 1 10.0.1.0/24 Subnet 2 10.0.2.0/24
Destination Target
10.0.0.0/16 local
EC2 Instance EC2 Instance
10.0.1.1 10.0.2.1
10.0.2.1
© 2022,
2021, Amazon Web Services, Inc. or its Affiliates.
Route Tables – Internet Traffic
Route Table 1 - Rules
VPC 10.0.0.0/16
Destination Target
Subnet 1 10.0.1.0/24 Subnet 2 10.0.2.0/24 10.0.0.0/16 local
Route Table 1
Route Table 1
1.2.3.4
Internet 1.2.3.4
© 2022,
2021, Amazon Web Services, Inc. or its Affiliates.
Route Tables – Internet Traffic
Route Table 1 - Rules
VPC 10.0.0.0/16
Destination Target
Subnet 2 10.0.2.0/24 10.0.0.0/16 local
Subnet 1 10.0.1.0/24
0.0.0.0/0 Igw-12345
EC2 Instance
EC2 Instance
10.0.1.1 10.0.2.1
1.2.3.4
© 2022,
2021, Amazon Web Services, Inc. or its Affiliates.
Public vs. Private Subnet
VPC 10.0.0.0/16
Private Route Table Public Route Table
© 2022,
2021, Amazon Web Services, Inc. or its Affiliates.
Public IPs
VPC 10.0.0.0/16
Public Route Table
Public subnet 1 10.0.2.0/24 Destination Target
10.0.0.0/16 local
0.0.0.0/0 Igw-12345
EC2 Instance
Private IP: 10.0.2.1
Public IP: 1.2.3.4
Internet
gateway
Route Table
© 2022,
2021, Amazon Web Services, Inc. or its Affiliates.
VPC - DNS & DHCP
VPC 10.0.0.0/16
Reserved for AWS use:
10.0.0.0
10.0.0.1
10.0.0.2
10.0.0.3
VPC DHCP VPC DNS 10.0.0.255
EC2 Instance
Private IP: 10.0.2.1
Private DNS: ip-10.0.2.1.us-west-2.compute.internal
© 2022,
2021, Amazon Web Services, Inc. or its Affiliates.
Internet Access for Private Subnets – NAT Gateway
VPC 10.0.0.0/16
Private Route Table Public Route Table
Private instance
Private IP: 10.0.1.1 NAT gateway
Ngw-345
1.2.3.4 EIP: 2.3.4.5
© 2022,
2021, Amazon Web Services, Inc. or its Affiliates.
Multi-AZ Best Practices
Region us-east-1
VPC 10.0.0.0/16
IGW
AZ (us-east-1a) AZ (us-east-1b)
© 2022,
2021, Amazon Web Services, Inc. or its Affiliates.
Security Groups – Default Group Rules
VPC 10.0.0.0/16 Security Group 1
Security group 1
Outbound Rules
EC2
Protocol Port Destination
All All 0.0.0.0/0
© 2022,
2021, Amazon Web Services, Inc. or its Affiliates.
Security Groups – Web Server Example
VPC 10.0.0.0/16 Security Group 1
Inbound Rules
Availability Zone us-east-1a
Protocol Port Source
Subnet 1 10.0.1.0/24 TCP 80 0.0.0.0/0
Security group 1
Outbound Rules
© 2022,
2021, Amazon Web Services, Inc. or its Affiliates.
Security Groups – Reference other groups
Web server security group
VPC 10.0.0.0/16
Inbound Rules
Availability Zone us-east-1a
Protocol Port Source
Subnet 1 10.0.1.0/24 TCP 80 0.0.0.0/0
Outbound Rules
Webserver security group Protocol Port Destination
All All 0.0.0.0/0
EC2
Database security group
Inbound Rules
Database security group
Protocol Port Source
TCP 3306 sg-webserver
© 2022,
2021, Amazon Web Services, Inc. or its Affiliates.
Security Groups – Self-referencing rules
VPC 10.0.0.0/16
Subnet 1 10.0.1.0/24
Inbound Rules
EC2 EC2
© 2022,
2021, Amazon Web Services, Inc. or its Affiliates.
Network Access Control Lists (NACLs)
Region us-east-1 NACL Configuration
Subnet 1 10.0.1.0/24
Outbound Rules
© 2022,
2021, Amazon Web Services, Inc. or its Affiliates.
VPC Building Blocks - Summary
VPC 10.0.0.0/16
NACL
NACL
Private Route Public Route
Table Table
© 2022,
2021, Amazon Web Services, Inc. or its Affiliates.
Stay on AWS network: VPC Endpoints
Amazon
VPC PrivateLink
VPC VPC
• Connect your VPC to:
Internet gateway
• Supported AWS services
Network Load Balancer
• VPC endpoint services Public subnet
(NLB)
powered by PrivateLink
VPC Endpoint Service
• Doesn’t require public IPs or
EC2
Internet connectivity Instance
VPC Endpoint
• Horizontally scaled, redundant, Amazon
and highly available Private subnet
Simple Storage Service
(S3)
Peering
Private instance connection Private instance
VPX-123
10.0.0.1 192.168.0.1
© 2022,
2021, Amazon Web Services, Inc. or its Affiliates.
VPC Peering – No Transitive Routing
© 2022,
2021, Amazon Web Services, Inc. or its Affiliates.
VPC Peering – No Transitive Routing
Peering
connection
© 2022,
2021, Amazon Web Services, Inc. or its Affiliates.
AWS Site-to-Site VPN
On-prem data center VPC 10.0.0.0/16 VPC Route Table
172.16.0.0/16
Destination Target
10.0.0.0/16 local
172.16.0.0/16 VGW-123
© 2022,
2021, Amazon Web Services, Inc. or its Affiliates.
AWS Site-to-Site VPN
VPC VPC Route Table
10.0.0.0/16 Destination Target
Virtual
On-prem data center Private Gateway
10.0.0.0/16 local
172.16.0.0/16 VGW-123
172.16.0.0/16 VGW-123
IPSec
Customer
gateway Route Table
IPSec
IPSec
On-prem data center
172.17.0.0/16
On-prem data center
172.18.0.0/16
Customer
gateway
Customer
gateway
© 2022,
2021, Amazon Web Services, Inc. or its Affiliates.
AWS Direct Connect
Customer Data Center Direct Connect Location AWS Cloud
Equinix DA1
Region us-east-1
Customer or AWS cage
partner cage VPC
Private VIF
(recommended)
© 2022,
2021, Amazon Web Services, Inc. or its Affiliates.
VPN & Direct Connect - Mesh Topology
VPC VPC
VPC Peering
VPC
VPN
Direct Connect
VPN
Data center
© 2022,
2021, Amazon Web Services, Inc. or its Affiliates.
Transit Gateway & Direct Connect Gateway
VPC VPC
VPC
and/or
Data center
© 2022,
2021, Amazon Web Services, Inc. or its Affiliates.
AWS Client VPN
AWS Cloud
VPC
10.0.0.0/16
On-prem data center
172.16.0.0/16 IPSec
Route Table
Customer VGW-123
gateway
Availability Zone 1
Subnet 1
Security group
TLS
TCP or UDP
User Client VPN
AWS Client VPN
1.2.3.4 Network Interface
Endpoint 10.0.0.1
With OpenVPN Client
192.168.0.1/24
Security group
EC2
10.0.0.2
• Domain registrar
GET example.com
• Public and private DNS zones
Web Service
© 2022,
2021, Amazon Web Services, Inc. or its Affiliates.
DNS with Amazon Route 53
• Domain registrar
GET example.com
• Public and private DNS zones
© 2022,
2021, Amazon Web Services, Inc. or its Affiliates.
DNS with Amazon Route 53
GET example.com
• Global DNS service
• 100% Availability SLA Amazon Route 53
© 2022,
2021, Amazon Web Services, Inc. or its Affiliates.
Hybrid DNS Resolution - Route 53 Resolvers
Subnet 1
dns.corp.com
database.example.com
© 2022,
2021, Amazon Web Services, Inc. or its Affiliates.
Amazon CloudFront
• Global CDN
• 220+ Points of Presence
© 2022,
2021, Amazon Web Services, Inc. or its Affiliates.
Up Next
Hands-on Lab - VPC
© 2022,
2021, Amazon Web Services, Inc. or its Affiliates.