AWS Direct Connect

Difficulty: Advanced

Question

What is AWS Direct Connect, how does it work, and when would you choose it over a Site-to-Site VPN?

Answer

AWS Direct Connect is a private, dedicated network link between your data center or office and AWS that does not travel over the public internet. Traffic goes over a physical cross-connect at a Direct Connect location, which gives more consistent latency and throughput, higher bandwidth and usually lower data transfer out costs than an internet-based VPN.

How a Direct Connect link is built

  1. You order a connection in the AWS console at a Direct Connect location (a colocation facility; India has several, for example in Mumbai and other major metros).
  2. Your router (or a partner's) is cross-connected to an AWS router in that facility.
  3. You create virtual interfaces (VIFs) over the connection, each on its own VLAN with its own BGP session.
  4. Routes are exchanged with BGP and traffic flows privately.

Getting the physical connection provisioned can take days to weeks, so it is a planned project, not something you set up during an outage.

Connection types and interfaces

  • Dedicated connections: a physical port of 1, 10, 100 or 400 Gbps directly with AWS.
  • Hosted connections: provided by a Direct Connect partner in smaller increments, from 50 Mbps up to the multi-gigabit range, useful when you do not need a full port.

Virtual interface types:

  • Private VIF: reach resources in a VPC, through a virtual private gateway or a Direct Connect gateway.
  • Transit VIF: connect to one or more Transit Gateways through a Direct Connect gateway, the scalable choice for many VPCs.
  • Public VIF: reach AWS public endpoints such as S3 and DynamoDB over the private link instead of the internet.

A Direct Connect gateway is a global object that lets one connection reach VPCs or transit gateways in multiple Regions.

Direct Connect vs Site-to-Site VPN

Direct ConnectSite-to-Site VPN
PathPrivate dedicated linkEncrypted tunnels over the internet
Setup timeDays to weeksMinutes
BandwidthUp to 400 Gbps per dedicated portAround 1.25 Gbps per tunnel
Latency consistencyPredictableVaries with the internet
EncryptionNot by default (use MACsec or VPN over DX)IPsec built in
CostPort hours plus lower data transfer out rateHourly per connection plus normal data transfer

Design points interviewers look for

  • Encryption: Direct Connect is private but not encrypted by default. Use MACsec on supported dedicated connections, or run an IPsec VPN over a public or transit VIF if compliance, such as RBI guidelines for a bank, requires encryption in transit.
  • Resiliency: a single connection is a single point of failure. AWS's recommended models are two connections at two different locations for high resiliency, or two connections at each of two locations for maximum resiliency. A Site-to-Site VPN is a cheap backup path.
  • Use cases: a bank keeping its core banking system on-prem while running mobile app backends on AWS, large nightly data transfers to S3, or latency-sensitive trading and real-time video.
Path of traffic over Direct Connect. Traffic leaves your network on a private cross-connect and reaches VPCs through virtual interfaces.
  1. On-premises router: Your data center or office edge.
  2. Direct Connect location: Cross-connect to an AWS router in a colocation facility.
  3. Virtual interface (BGP): Private, transit or public VIF on a VLAN.
  4. Direct Connect gateway: Global object reaching multiple Regions.
  5. Transit Gateway or VPC: Workloads receive the traffic privately.

Key points

  • Direct Connect is a dedicated private link to AWS, bypassing the internet.
  • Dedicated ports come in 1, 10, 100 and 400 Gbps; hosted connections come via partners in smaller sizes.
  • VIF types: private (VPC), transit (Transit Gateway), public (AWS public services).
  • Not encrypted by default; use MACsec or IPsec VPN over Direct Connect.
  • Build redundancy with multiple connections and locations, with VPN as a backup.

Common follow-up questions

  • How would you design a highly available Direct Connect setup?
  • What is a Direct Connect gateway and why would you need one?
  • How do you encrypt traffic over Direct Connect?
  • How does BGP decide between Direct Connect and a backup VPN path?

Interview tips

  • Always mention that Direct Connect is not encrypted by default; it is a favourite trick question.
  • Compare it with Site-to-Site VPN on setup time, bandwidth and consistency, not just 'faster'.
  • Talk about redundancy; a single-connection design is a red flag to interviewers.

Concepts covered

Dedicated Connection, Virtual Interfaces, Direct Connect Gateway, BGP, Hybrid Networking, MACsec

More AWS & Cloud Fundamentals questions