/Networking & Content Delivery
Concept
Medium

Networking & Content Delivery

7 min read·vpcsubnetssecurity-groupsnaclinternet-gatewaynat-gatewayroute53cloudfrontdirect-connectvpnapi-gatewayclf-c02

AWS networking is built around Amazon VPC, which provides logical network isolation. Key components include subnets (public and private), Security Groups (stateful, instance-level), NACLs (stateless, subnet-level), Internet Gateway, and NAT Gateway. CloudFront delivers content globally, Route 53 manages DNS, and Direct Connect or Site-to-Site VPN provides hybrid connectivity.


1. Amazon VPC — Virtual Private Cloud

A VPC is a logically isolated virtual network in AWS. You define the IP address range, divide it into subnets, configure routing, and control traffic using firewalls. Every AWS account gets a default VPC in each Region to get started immediately.

Rendering diagram…

VPC Core Components

ComponentDescription
CIDR BlockIP address range for the VPC (e.g., 10.0.0.0/16 = 65,536 IPs)
SubnetsSubdivisions of the VPC in a single AZ; public or private
Route TableRules controlling where traffic flows from each subnet
Internet Gateway (IGW)Enables bidirectional internet access for resources with public IPs
NAT GatewayOutbound-only internet for private subnet resources; AWS-managed; charged per hour
Security GroupsStateful instance-level firewall; allow rules only
Network ACLs (NACLs)Stateless subnet-level firewall; allow and deny rules
VPC PeeringPrivate connection between two VPCs
VPC EndpointsPrivate connection to AWS services without internet or NAT
VPC Flow LogsCapture IP traffic metadata for security monitoring

2. Security Groups vs Network ACLs

Rendering diagram…
FeatureSecurity GroupNetwork ACL
Applies toIndividual instances (ENI)Entire subnet
StateStateful — return traffic automatically allowedStateless — must explicitly allow inbound AND outbound
Rule typesAllow only — no explicit denyAllow AND Deny
Rule evaluationAll rules evaluated togetherRules evaluated in numeric order; first match wins
Default behaviorAll traffic denied unless a rule allows itDefault VPC NACL allows all traffic in and out
Typical useWhitelist ports per serviceSubnet-wide block rules (e.g., block a bad IP range)

Key exam tip — Stateful vs Stateless:

  • Stateful (Security Group): You allow inbound port 443 → AWS automatically allows the response back out. You only write one rule.
  • Stateless (NACL): You allow inbound port 443 → you must ALSO explicitly allow outbound ephemeral ports for the response. Two rules needed.

3. VPC Endpoints — Private AWS Service Access

Without VPC Endpoints, traffic from a private subnet to S3 travels: private subnet → NAT Gateway → Internet Gateway → public internet → S3. With endpoints, traffic stays entirely on AWS's private network.

Endpoint TypeConnects ToCost
Gateway EndpointAmazon S3 and DynamoDB onlyFree
Interface Endpoint100+ other AWS services via PrivateLinkSmall hourly charge

4. VPC Peering

  • Direct private network connection between two VPCs (no internet, no gateway, no VPN)
  • Works across different AWS accounts and different Regions (inter-region peering)
  • NOT transitive — if VPC-A peers with VPC-B, and VPC-B peers with VPC-C, VPC-A cannot reach VPC-C automatically
  • Use AWS Transit Gateway when you need to connect many VPCs in a hub-and-spoke model

5. Amazon Route 53 — DNS Service

Rendering diagram…

Route 53 Routing Policies:

PolicyRoutes Based OnUse Case
SimpleSingle destinationBasic single-endpoint routing
WeightedPercentage split (e.g., 80%/20%)A/B testing, gradual traffic shift
Latency-basedLowest latency Region for the userGlobal apps with multi-region deployments
FailoverHealth check — active/passive switchDisaster recovery
GeolocationUser's country or continentCompliance, localization, language routing
GeoproximityGeographic distance with optional biasFine-grained geographic traffic control
Multi-valueMultiple healthy IPs returnedSimple load balancing with health checks

6. Amazon CloudFront — Content Delivery Network

Rendering diagram…
  • Global CDN with 400+ edge locations — content served from the location nearest the user
  • Supports static content (S3: images, HTML, CSS, JS) and dynamic content (ALB, custom origins)
  • Integrates with AWS WAF for application-layer DDoS protection and web exploit filtering
  • Integrates with AWS Shield for network-layer DDoS protection
  • HTTPS support with SSL/TLS termination at the edge; integrates with ACM

7. Hybrid Connectivity — On-Premises to AWS

Rendering diagram…
FeatureSite-to-Site VPNAWS Direct Connect
Connection typeIPSec tunnel over public internetDedicated private fiber
Setup timeHoursWeeks to months
BandwidthLimited by internet connection1 Gbps to 100 Gbps
LatencyVariable (shared internet)Consistent and predictable
CostLower — pay per connection hour and dataHigher — port hours plus provider fees
EncryptionYes — IPSec by defaultNot encrypted by default (add MACsec or VPN on top)
Best forQuick setup, backup connection, dev/testHigh bandwidth, consistent latency, regulated workloads

8. Amazon API Gateway

  • Fully managed service to create, publish, secure, and monitor APIs at any scale
  • Supports REST APIs, HTTP APIs, and WebSocket APIs
  • Common pattern: client → API Gateway → Lambda (serverless API backend)
  • Handles: authentication, rate limiting, caching, request/response transformation, monitoring

9. AWS Transit Gateway

  • Central hub for connecting multiple VPCs and on-premises networks
  • Replaces complex VPC peering meshes with a single hub-and-spoke topology
  • Supports thousands of VPC connections and VPN/Direct Connect attachments

10. CLF-C02 Quick Reference

TopicKey Fact
VPCLogically isolated virtual network; you define IP ranges and subnets
Public subnetHas route to IGW; resources can have public IPs and internet access
Private subnetNo direct internet; outbound via NAT Gateway only
IGWBidirectional internet access for public subnet resources
NAT GatewayOutbound-only internet for private subnet; AWS-managed; per-AZ
Security GroupsStateful; instance-level; allow rules only; return traffic automatic
NACLsStateless; subnet-level; allow and deny; numeric rule order; both directions explicit
VPC Endpoint GatewayFree; private S3 and DynamoDB access without internet
VPC PeeringPrivate VPC-to-VPC; NOT transitive
Transit GatewayHub for many VPCs and on-premises; replaces peering mesh
Route 53Managed DNS; health checks; 7 routing policies
CloudFrontCDN; 400+ edge locations; caches content near users; WAF and Shield integration
Site-to-Site VPNIPSec over internet; hours to set up; variable latency
Direct ConnectPrivate dedicated fiber; weeks to provision; consistent bandwidth and latency
API GatewayManaged API publishing; REST, HTTP, WebSocket; pairs with Lambda

Practice Questions7

easy

Q1. What does Amazon VPC (Virtual Private Cloud) provide?


Select one answer before revealing.

easy

Q2. Which VPC component acts as a stateful virtual firewall at the EC2 instance level, controlling inbound and outbound traffic with ALLOW rules only?


Select one answer before revealing.

medium

Q3. What is the key difference between a Security Group and a Network ACL (NACL) in a VPC?


Select one answer before revealing.

medium

Q4. Resources in a private subnet need to download software updates from the internet but should NOT be directly reachable from the internet. Which VPC component enables this?


Select one answer before revealing.

easy

Q5. Which AWS service is a fully managed, global DNS service that also supports routing policies like latency-based routing, failover routing, and geolocation routing?


Select one answer before revealing.

medium

Q6. A company wants a dedicated, private, high-bandwidth connection between their corporate data center and AWS that bypasses the public internet for consistent network performance. Which service should they use?


Select one answer before revealing.

medium

Q7. Which TWO services can establish network connectivity between an on-premises data center and an Amazon VPC? (Select TWO — more than one answer may be correct)


Select one answer before revealing.