Xoxoftware - XOXO Creative Studio | Web & Mobile App Development | Fred Cheung | Hong Kong
AWSNetworking

AWS Direct Connect and Site-to-Site VPN

Hybrid connectivity — dedicated private connections vs encrypted tunnels, covering VGW, Transit Gateway, DX Gateway, and failover patterns.

Overview

AWS Direct Connect (DX) and Site-to-Site VPN are the two primary options for connecting on-premises networks to AWS — Direct Connect provides a dedicated private connection with consistent performance, while Site-to-Site VPN establishes encrypted tunnels over the public internet.

AspectDirect ConnectSite-to-Site VPN
Connection typeDedicated fibre via DX location (colocation facility)Encrypted IPsec tunnels over public internet
Bandwidth1 Gbps, 10 Gbps, 100 Gbps (or hosted: 50 Mbps–10 Gbps)Up to 1.25 Gbps per tunnel
LatencyConsistent, low (private path)Variable (internet-dependent)
Setup timeWeeks to months (physical cross-connect)Minutes to hours
EncryptionNot encrypted by default (add VPN over DX)Encrypted (IPsec)
CostPort fee + data transfer (no internet egress)Per-hour + data transfer

Core Concepts

ConceptDescription
Direct Connect (DX)A dedicated network connection from on-premises to AWS via a DX location
DX LocationA colocation facility where AWS has equipment; the physical meeting point for DX connections
Virtual Interface (VIF)A logical connection over a DX port — Private VIF (VPC), Public VIF (AWS public services), or Transit VIF (Transit Gateway)
DX GatewayA globally available gateway that connects a DX connection to VPCs in multiple regions
Site-to-Site VPNEncrypted IPsec tunnel between on-premises and AWS over the internet
Virtual Private Gateway (VGW)VPN endpoint on the AWS side, attached to a single VPC
Customer Gateway (CGW)Representation of the on-premises VPN device in AWS configuration
Transit Gateway (TGW)Hub that connects multiple VPCs, VPNs, and DX connections with transitive routing
Link Aggregation Group (LAG)Bundles multiple DX connections (same speed) into a single logical connection for throughput

Direct Connect Architecture

On-Premises          DX Location              AWS Region
┌──────────┐      ┌───────────────┐      ┌────────────────────────┐
│ Customer  │      │  Customer     │      │                        │
│ Router    │──────│  Router/Cage  │      │   VPC A (10.0.0.0/16)  │
│           │      │       │       │      │          ▲              │
└──────────┘      │       │ DX    │      │   Private VIF          │
                  │       │ Port  │──────│──→ VGW or TGW          │
                  │       │       │      │          ▼              │
                  │       │       │      │   VPC B (10.1.0.0/16)  │
                  └───────────────┘      │                        │
                                         └────────────────────────┘

Virtual Interface Types

VIF TypeConnects ToUse Case
Private VIFVGW (single VPC) or DX GatewayAccess VPC resources via private IP
Public VIFAWS public service endpointsAccess S3, DynamoDB, and other public AWS APIs privately
Transit VIFTransit Gateway (via DX Gateway)Access multiple VPCs across regions via TGW

SAA/SAP Tip: To connect a single DX to VPCs in multiple regions, use a DX Gateway with Transit VIF or Private VIFs. A DX Gateway is globally available and does not require multiple physical connections.


Site-to-Site VPN Architecture

On-Premises              Internet                AWS
┌──────────────┐      ┌──────────┐      ┌──────────────────────┐
│ CGW Device   │══════│ IPsec    │══════│  VGW or TGW          │
│ (VPN Router) │ Tunnel│ Tunnel  │      │      │               │
└──────────────┘   1  └──────────┘      │      ▼               │
       │                                │  VPC (10.0.0.0/16)   │
       │              ┌──────────┐      │                      │
       │══════════════│ IPsec    │══════│  (2 tunnels for HA)  │
            Tunnel 2  │ Tunnel   │      │                      │
                      └──────────┘      └──────────────────────┘
  • Each VPN connection provides two tunnels for redundancy (across different AWS endpoints)
  • Max throughput: 1.25 Gbps per tunnel; ECMP (Equal Cost Multi-Path) over TGW enables higher aggregate throughput
  • Supports BGP for dynamic routing or static routes

Redundancy and Failover Patterns

PatternDescriptionResilience Level
Single DXOne DX connection — single point of failureLow
DX + VPN backupDX as primary, VPN as failover over the internetMedium
Dual DX (same location)Two connections at the same DX locationMedium–High
Dual DX (different locations)Two connections at geographically separate DX locationsHigh
Dual DX + VPNMaximum resilience — two DX connections plus VPN failoverHighest

Exam Trap: A single Direct Connect connection is a single point of failure. For production workloads, always deploy a second DX or a VPN backup. The exam tests this pattern frequently.


Encryption Options

ScenarioEncryption Method
DX aloneNot encrypted (private but not encrypted at L3)
VPN aloneIPsec encryption (built-in)
DX + VPN overlayIPsec VPN tunnel running over the DX connection for encryption
DX + MACsecLayer 2 encryption on 10 Gbps and 100 Gbps dedicated DX connections

SAA/SAP Tip: For "encrypted connectivity with consistent latency," the answer is VPN over Direct Connect (IPsec tunnel running on top of the DX link) or MACsec for supported DX speeds. DX alone does not encrypt traffic.


VPN over Transit Gateway

When connected to a Transit Gateway, VPN supports ECMP (Equal Cost Multi-Path) routing:

  • Multiple VPN tunnels aggregate bandwidth (e.g., 4 tunnels × 1.25 Gbps = 5 Gbps)
  • Requires BGP and TGW (VGW does not support ECMP)
  • Useful when DX is not available but higher throughput is needed

Common Use Cases

  • Hybrid cloud — Extend on-premises data centre into AWS VPCs with predictable, low-latency connectivity via DX.
  • Data migration — Transfer large datasets over DX with consistent bandwidth (avoids internet congestion).
  • Disaster recovery — Replicate on-premises workloads to AWS; VPN as an immediate, low-cost DR link.
  • Compliance — Private connectivity that does not traverse the public internet (DX with MACsec).
  • Multi-region networking — DX Gateway + Transit VIF to connect on-premises to VPCs across multiple regions.
  • Quick-start hybrid — Site-to-Site VPN for immediate connectivity while waiting for DX provisioning.

SAA/SAP Exam Tips

SAA/SAP Tip: When a question asks for "private connectivity that does not go over the internet," the answer is Direct Connect. When it adds "encrypted," pair DX with a VPN overlay or MACsec.

Exam Trap: Direct Connect takes weeks to months to provision because it requires a physical cross-connect at a DX location. If the question needs connectivity "immediately" or "quickly," Site-to-Site VPN is the answer (optionally as a bridge until DX is ready).

SAA/SAP Tip: For "highest available hybrid connectivity," the answer is two DX connections at different DX locations plus a VPN backup. The exam often tests understanding of DX redundancy levels.


Cross-Cloud Equivalents

ProviderService / SolutionNotes
AWSAWS Direct Connect + Site-to-Site VPNBaseline
AzureAzure ExpressRoute + Azure VPN GatewayExpressRoute = DX equivalent; similar model
GCPCloud Interconnect (Dedicated / Partner) + Cloud VPNDedicated Interconnect = DX; Partner = hosted DX
On-PremisesMPLS circuits, IPsec VPN appliances (Cisco, Palo Alto, Fortinet)Traditional WAN connectivity

Pricing Model

Direct Connect

DimensionUnitNotes
Port hoursPer hourVaries by speed (1G, 10G, 100G) and location
Data transfer outPer GBLower than internet egress; varies by region
Data transfer inFreeNo charge for inbound data over DX

Site-to-Site VPN

DimensionUnitNotes
VPN connection hoursPer hour~$0.05/hr per connection
Data transfer outPer GBStandard internet egress rates
Accelerated VPN (Global Accelerator)Per hour + per GBOptional; improves performance via AWS backbone

Built by Fred Cheung @CookedRicer · Powered by Fumadocs & Github Copilot

On this page