Lesson 24

Hybrid Connectivity

AWS Site-to-Site VPN and AWS Direct Connect

1. Connecting VPC to On-Premises

By default, instances in a VPC cannot communicate with a remote on-premises network. AWS provides two primary options to establish this connectivity: AWS Site-to-Site VPN (over the public internet) and AWS Direct Connect (dedicated private connection).

2. AWS Site-to-Site VPN

AWS Site-to-Site VPN creates a secure, encrypted connection between your VPC and your on-premises data center over the public internet.

Components

ComponentDescription
Virtual Private GatewayThe AWS-side VPN concentrator attached to your VPC. It is the target for VPN-bound traffic in your route table.
Customer GatewayAn AWS resource that provides information to AWS about your on-premises VPN device (IP address, routing). It is not a physical device.
VPN ConnectionThe secure encrypted tunnel between the virtual private gateway and the customer gateway.

Setup Steps

  1. Create a virtual private gateway and attach it to your VPC.
  2. Define the customer gateway resource with your on-premises VPN device information.
  3. Establish the Site-to-Site VPN connection between the two gateways.
  4. Update route tables to point on-premises-bound traffic to the virtual private gateway.
  5. Update security group rules to allow traffic from the on-premises network.
Exam tip: Site-to-Site VPN runs over the public internet. It is encrypted and secure, but performance depends on internet conditions and bandwidth.

3. AWS Direct Connect

AWS Direct Connect (DX) enables you to establish a dedicated, private network connection between your on-premises data center and AWS. It uses open standard 802.1q VLANs.

Benefits over VPN

  • Reduces network costs (for high-volume data transfer)
  • Increases bandwidth throughput
  • Provides a more consistent network experience than internet-based connections
  • Bypasses the public internet entirely
Core idea: VPN = encrypted over the public internet (quick to set up, variable performance). Direct Connect = dedicated private fiber connection (takes longer to provision, consistent high performance).

4. Comparison

FeatureAWS Site-to-Site VPNAWS Direct Connect
Network pathPublic internet (encrypted)Dedicated private connection
Setup timeMinutes to hoursWeeks (requires physical cabling)
BandwidthUp to ~1.25 Gbps1 Gbps, 10 Gbps, or higher
PerformanceVariable (internet-dependent)Consistent, lower latency
CostLower initial costHigher upfront but lower per-GB cost at scale
EncryptionIPsec encryptedNot encrypted by default; can add IPsec on top

When to Choose Which

Need quick, low-cost connectivity for a proof of concept or low-volume traffic?Site-to-Site VPN.

Need consistent high bandwidth, low latency, and reduced data transfer costs at scale?AWS Direct Connect.

Need the highest reliability with a backup option? → Use DX as primary and Site-to-Site VPN as backup.

5. Quick Quiz

Test Your Understanding

Select one answer per question. You will receive immediate feedback.

1. Which AWS resource represents your on-premises VPN device and provides its IP address information to AWS?
2. A company needs a consistent, high-bandwidth, low-latency connection to AWS to transfer large datasets daily. Internet performance is unreliable. Which service should they use?
3. What is a primary advantage of AWS Site-to-Site VPN over AWS Direct Connect?
4. Which gateway is attached to the VPC side of an AWS Site-to-Site VPN connection?
5. After creating a Site-to-Site VPN connection, what must be updated to direct on-premises-bound traffic to the VPN gateway?
6. A company wants the highest reliability for their hybrid connection and plans to use Direct Connect as primary. What can serve as a cost-effective backup?
Progress: 0/6 correct (0%). Answer all questions to see the final recommendation.
Primary Source: AWS Academy Module 5: Networking and Content Delivery (module-5.txt), Section 3: VPC Networking.
Ask your teacher: If you need to distinguish when to choose Site-to-Site VPN vs. Direct Connect, the key differentiators are setup speed (VPN = fast) vs. consistent performance (DX = dedicated). The exam may present a scenario that emphasizes one over the other.
Last updated: June, 2026© 2026 Shahriar Ahmed ShovonCredits