VPC Section
VPC Section
Section
VPC
• Amazon Virtual Private Cloud (Amazon VPC) lets you provision a logically
isolated section of the AWS Cloud where you can launch AWS resources in a
virtual network
• You have complete control over your virtual networking environment, including
selection of your own IP address range, creation of subnets, and configuration of
route tables and network gateways.
Subnets www
• The first four IP addresses and the last IP address in each subnet CIDR
block are not available to use, and cannot be assigned to an instance. For
example, in a subnet with CIDR block 10.0.0.0/24, the following five IP
addresses are reserved:
1. 10.0.0.0: Network address.
2. 10.0.0.1: Reserved by AWS for the VPC router.
3. 10.0.0.2: Reserved by AWS for mapping to the Amazon-provided DNS.
4. 10.0.0.3: Reserved by AWS for future use.
5. 10.0.0.255: Network broadcast address.
VPC Diagram
AWS Cloud
AZ A
Network ACL & Security Groups
• NACL (Network ACL) VPC
Public subnet
• A virtual firewall at subnet level
• Can have ALLOW and DENY rules
• Rules only include IP addresses
NACL
• Security Groups
• A virtual firewall at instance level
• Can have only ALLOW rules
• Rules include IP addresses and other security
groups
Security group
Network ACLs vs Security Groups
https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Secur
ity.html#VPC_Security_Comparison
VPC Flow Logs
• Capture information about IP traffic going into your interfaces:
• VPC Flow Logs
• Subnet Flow Logs
• Elastic Network Interface Flow Logs
• Helps to monitor & troubleshoot connectivity issues. Example:
• Subnets to internet
• Subnets to subnets
• Internet to subnets
• Captures network information from AWS managed interfaces too: Elastic Load
Balancers, ElasticCache, RDS, Aurora, etc…
• VPC Flow logs data can go to S3 / CloudWatch Logs
VPC Peering
• A VPC peering connection is a networking
connection between two VPCs that enables VPC peering
A B
you to route traffic between them using VPC A VPC B
private IPv4 addresses or IPv6 addresses.
• Instances in either VPC can communicate
with each other as if they are within the same
network.
• You can create a VPC peering connection VPC C
VPC peering
between your own VPCs, or with a VPC in A C
VPC peering
B C
VPC Endpoint
• VPC Endpoint Gateway: S3 & DynamoDB Gateway
S3 DynamoDB CloudWatch
AWS PrivateLink (VPC Endpoint Services)
• Most secure & scalable way to expose a service to 1000s of VPCs
• Does not require VPC peering, internet gateway, NAT, route tables…
• Requires a network load balancer (Service VPC) and ENI (Customer VPC)
AWS
private
Application Network Elastic Network Consumer
service Load Balancer Interface (ENI) Application
Site to Site VPN & Direct Connect
• Site to Site VPN
• Connect an on-premises VPN to AWS Public www Public www
• The connection is automatically encrypted
• Goes over the public internet Site-to-Site VPN
• Direct Connect (DX) (encrypted)
VPC
Corporate Private subnet
Site-to-Site VPN
data center
Computer with
AWS Client VPN (OpenVPN)