AWS Direct Connect Architecture
Complete the full lesson to earn 25 points — 50 with Pro
Work through each section, then tap “Mark as Complete” on the last one.
✦ Skip the page breaks, the wait, and see fewer ads — read each lesson on a single page with Pro
AWS Direct Connect Architecture: A Comprehensive Guide
Introduction to AWS Direct Connect
In the early days of cloud computing, most organizations relied on the public internet to connect their on-premises data centers to their cloud environments. While the internet is accessible and convenient, it is inherently unpredictable. Traffic traveling over the public internet is subject to variable latency, jitter, and potential packet loss, as it hops through multiple third-party networks before reaching its destination. For businesses running mission-critical workloads, databases, or large-scale data migrations, this lack of predictability represents a significant operational risk.
AWS Direct Connect was designed to solve this by providing a dedicated, private physical connection between your internal network and Amazon Web Services. Instead of traversing the public internet, your data travels over a private line, often provided by a colocation partner or a telecommunications carrier. This architecture essentially extends your local network into the AWS global infrastructure, effectively treating your VPCs as if they were another subnet in your own data center.
Understanding Direct Connect is vital for any network engineer or cloud architect because it is the foundation for high-performance hybrid cloud architectures. It is not merely a "faster" internet connection; it is a fundamental shift in how your network traffic is routed, secured, and managed. By mastering this technology, you gain the ability to provide consistent bandwidth, lower latency, and higher security for your most important cloud-based operations.
Understanding the Physical Architecture
At its core, AWS Direct Connect is a physical interface. When you provision a connection, you are requesting a cross-connect between your networking hardware (typically a router in a colocation facility) and an AWS Direct Connect device. This physical link operates at speeds ranging from 1 Gbps to 100 Gbps, depending on your requirements and the capabilities of the specific Direct Connect location.
The Components of a Direct Connect Setup
To build a functional connection, you must understand several key components that work in concert:
- Direct Connect Location: This is a specific physical facility where AWS maintains network equipment. You must be present in one of these locations, or have a partner that can extend your network into one, to establish a physical connection.
- The Connection: This is the physical ethernet connection between your router and the AWS device. You can purchase these as dedicated connections or hosted connections through an AWS partner.
- Virtual Interfaces (VIFs): A physical connection is just the "pipe." You must create virtual interfaces to actually route traffic. A single physical connection can support multiple VIFs, allowing you to connect to different VPCs or services simultaneously.
- Direct Connect Gateway (DXGW): This is a global resource that allows you to connect your on-premises network to VPCs in any AWS region (except China). It acts as a hub, simplifying the routing complexity when you have a multi-region cloud footprint.
- Direct Connect Router: The hardware on your side of the connection. This router must support BGP (Border Gateway Protocol) because that is the language used to exchange routing information between your network and AWS.
Callout: Dedicated vs. Hosted Connections A Dedicated Connection is a physical Ethernet port exclusively for your use. You order this directly from AWS, and they provide a Letter of Authorization (LOA) for your cross-connect. A Hosted Connection is provided by an AWS Direct Connect Delivery Partner. The partner owns the physical port and creates a virtual connection for you. Hosted connections are often easier to provision for lower bandwidth needs, while dedicated connections provide full control for high-bandwidth, high-security requirements.
Routing and BGP: The Language of Connectivity
AWS Direct Connect does not use static routing to manage the flow of traffic. Instead, it relies on the Border Gateway Protocol (BGP). BGP is the standard routing protocol of the internet, and it is essential for Direct Connect because it allows your local network and AWS to dynamically share reachability information.
When you configure a virtual interface, you must provide a BGP Autonomous System Number (ASN). If you are using a private ASN, you can choose any number from the private range (64512 to 65534). AWS also has its own ASN, which is 64512 by default for private VIFs. The BGP session establishes a neighbor relationship between your edge router and the AWS router. Once this session is up, your router advertises your internal network prefixes to AWS, and AWS advertises its VPC CIDR blocks back to you.
Establishing the BGP Session
To configure BGP, you need to ensure your router is correctly set up to handle the peering. Here is a conceptual look at what the configuration might look like on a standard enterprise-grade router:
! Example BGP configuration for an on-premises router
router bgp 65001
neighbor 169.254.0.1 remote-as 64512
neighbor 169.254.0.1 password [YourGeneratedPassword]
! Advertise your local network prefix to AWS
network 10.0.0.0 mask 255.255.0.0
! Enable the BGP session
address-family ipv4
neighbor 169.254.0.1 activate
exit-address-family
In this example, your router (ASN 65001) peers with the AWS router (ASN 64512). The IP addresses used for the peering (169.254.0.1) are standard Link-Local addresses provided by AWS during the configuration of the Virtual Interface. It is critical that you use the exact settings provided by the AWS console to ensure the BGP session initializes correctly.
Note: BGP is not just about connectivity; it is about policy. You can use BGP communities to influence how AWS routes traffic back to you. For instance, you can use specific BGP community tags to indicate the preference of a path if you have multiple Direct Connect connections, effectively allowing you to perform traffic engineering to favor your primary data center over a secondary one.
Types of Virtual Interfaces (VIFs)
When you are ready to create a Virtual Interface, you have to choose between three specific types, each serving a distinct purpose in your network architecture:
- Private VIF: This is the most common type. It is used to connect to your VPCs via a Direct Connect Gateway or a Virtual Private Gateway (VGW). It allows you to access private IP space (RFC 1918) within your VPCs.
- Public VIF: This is used to access AWS public services, such as S3, DynamoDB, or AWS APIs, over the Direct Connect link rather than the public internet. This is useful if you want to keep traffic to S3 buckets off the public internet for compliance or performance reasons.
- Transit VIF: This is used specifically with a Direct Connect Gateway to connect to a Transit Gateway. It allows you to connect multiple VPCs and on-premises networks in a hub-and-spoke architecture. This is the most advanced and flexible configuration for large-scale enterprise networks.
Choosing the Right VIF
| Feature | Private VIF | Public VIF | Transit VIF |
|---|---|---|---|
| Primary Use | Private VPC access | Public Service access | Large-scale VPC networking |
| Routing | Private IP space | AWS Public IP space | Private IP space (via TGW) |
| Gateway | VGW or DXGW | Internet Gateway (logical) | Transit Gateway |
| Scalability | Medium | High | Very High |
Step-by-Step Implementation Guide
Setting up Direct Connect is a multi-stage process that involves both AWS administrative tasks and physical/networking tasks in your data center.
Phase 1: Planning and Ordering
- Select a Location: Identify the AWS Direct Connect location closest to your data center.
- Order the Connection: Through the AWS console, request the connection. You will receive an email containing a Letter of Authorization (LOA) and Connecting Facility Assignment (CFA).
- Provide LOA to Provider: Send the LOA to your colocation provider or network carrier. They will use this document to perform the physical cross-connect from your cage to the AWS cage.
Phase 2: Virtual Interface Creation
- Navigate to Direct Connect: In the AWS Management Console, go to the Direct Connect dashboard.
- Create VIF: Select your physical connection and click "Create Virtual Interface."
- Configure BGP: Input your ASN and the VLAN ID provided by your network team. Ensure the BGP password is set to a secure, complex string.
- Accept the VIF: If you are connecting to a different AWS account (e.g., a central networking account), you must accept the VIF request in the destination account.
Phase 3: Routing Configuration
- Configure the Router: Update your edge router configuration with the BGP peering details.
- Verify Peer Status: Check the BGP state on your router. It should transition from "Idle" to "Connect" to "Established."
- Validate Routes: Run a command like
show ip bgp summaryorshow ip routeon your router to ensure you are receiving the expected prefixes from AWS.
Warning: Always verify your BGP route filtering. If you inadvertently advertise the entire internet (0.0.0.0/0) to AWS via your Direct Connect, you could disrupt your network connectivity and potentially violate your service provider's routing policies. Use route maps or prefix lists to strictly filter the networks you advertise.
High Availability and Redundancy
A single Direct Connect link is a single point of failure. If the fiber is cut or the AWS router experiences a hardware issue, your connection will go down. For production workloads, you must design for resiliency. AWS provides specific recommendations for achieving high availability.
The Resiliency Model
- Dual Router, Single Location: This protects against a router failure in your data center. You connect two routers to the same AWS Direct Connect location.
- Dual Location, Dual Provider: This is the "gold standard." You connect to two different Direct Connect locations using two different service providers. This protects you against a total failure of a facility or a regional carrier issue.
- VPN Backup: Many organizations choose to use a Site-to-Site VPN as a backup to their Direct Connect. If the Direct Connect link fails, BGP will automatically withdraw the routes, and your traffic will fail over to the encrypted VPN tunnel over the internet. While performance will drop, connectivity is maintained.
Best Practices for Direct Connect
To ensure your Direct Connect implementation is stable and efficient, follow these industry-standard best practices:
- Implement BGP Authentication: Always use a strong MD5 password for your BGP peering. This prevents unauthorized devices from attempting to establish a BGP session with your router.
- Monitor Connection Health: Use Amazon CloudWatch to monitor metrics like
ConnectionBps,ConnectionErrorCount, andVirtualInterfaceBGPState. Set up alerts so you are notified immediately if a BGP session drops. - Use Jumbo Frames: If your application supports it, enable Jumbo Frames (MTU of 9001 bytes) on your Direct Connect connection. This reduces the number of packets required for large data transfers, which decreases the CPU load on your routers and improves throughput.
- Automate Configuration: Use Infrastructure as Code (IaC) tools like Terraform or AWS CloudFormation to manage your Direct Connect resources. This ensures consistency and makes it easier to audit your network configuration.
- Regular Testing: Periodically simulate a failure of your primary Direct Connect link during a maintenance window. Verify that your BGP failover to your secondary link or VPN works as expected.
Common Pitfalls and Troubleshooting
Even with careful planning, issues can arise. Here are the most common problems network engineers encounter:
1. BGP Peering Fails to Establish
The most common cause is a mismatch in configuration. Check the following:
- ASN Mismatch: Ensure the ASN you configured matches the one you provided in the AWS console.
- VLAN Mismatch: The VLAN ID must match exactly between your router sub-interface and the AWS configuration.
- IP Address Mismatch: Verify the peer IP addresses match the ones assigned by AWS.
2. Routes Are Not Propagated
If the BGP session is "Established" but you don't see routes, check:
- Route Maps: Do you have an outbound route map on your router that is blocking the advertisement of your local prefixes?
- VPC Attachment: Is your Virtual Private Gateway or Transit Gateway correctly attached to the VPCs you are trying to reach?
- Propagation: If using a Virtual Private Gateway, ensure "Route Propagation" is enabled on the VPC route table associated with your subnets.
3. Asymmetric Routing
Asymmetric routing occurs when traffic leaves via one path and returns via another. This can cause firewalls to drop packets because they see a response without an initial request.
- Solution: Use BGP
AS_PATHprepending to influence traffic. By making one path look "longer" to the BGP algorithm, you can force traffic to prefer a specific link for both ingress and egress.
Callout: The Importance of MTU A common, subtle issue in Direct Connect is MTU mismatch. If your local network is configured for 1500 bytes and your Direct Connect is set for 9001 bytes (Jumbo Frames), you might experience dropped packets for large segments of data. Always ensure that the MTU is consistent across the entire path, including any intermediate switches or firewalls between your edge router and the AWS connection point.
Practical Example: Configuring a Transit VIF
A Transit VIF is the preferred way to connect to a Transit Gateway, enabling a scalable architecture. Here is a high-level workflow for this setup:
- Create a Transit Gateway (TGW): In your networking account, create a TGW.
- Create a DXGW: Create a Direct Connect Gateway.
- Associate DXGW with TGW: In the DXGW settings, add the TGW as an attachment.
- Create the Transit VIF: When creating the VIF, select "Transit" as the type and select the DXGW you just created.
- Configure Router: On your router, you will need to configure BGP to peer with the AWS Transit VIF.
- Verify Routing: Ensure the TGW route table has the necessary entries to route traffic back to your on-premises network.
This setup is highly effective because it allows you to connect hundreds of VPCs to your on-premises network through a single Transit VIF, significantly reducing the management overhead of maintaining individual VIFs for every VPC.
Security Considerations
While Direct Connect is a private connection, it is not encrypted by default. The traffic flowing over the fiber is visible to anyone with access to the physical line. If you are operating in a highly regulated industry (like healthcare or finance) and require end-to-end encryption, you should consider implementing MACsec or an IPsec VPN tunnel over the Direct Connect.
- MACsec: AWS supports MACsec (IEEE 802.1AE) for 10 Gbps and 100 Gbps dedicated connections. This provides hardware-level encryption between your equipment and the AWS device.
- IPsec VPN: You can build an IPsec VPN tunnel over your Direct Connect. This provides an encrypted overlay, ensuring that even if the physical line is compromised, your data remains secure. This adds a slight overhead to your CPU and reduces the maximum MTU, but it is the most robust way to protect sensitive data.
Frequently Asked Questions
Q: Can I use Direct Connect for internet access? A: No. Direct Connect is for private communication between your network and AWS. It is not an ISP replacement for general internet browsing.
Q: How long does it take to set up? A: Provisioning the physical connection can take several weeks, as it depends on the lead time of the cross-connect from your data center provider to the AWS cage. Once the physical link is in place, the logical configuration (VIFs, BGP) takes only minutes.
Q: Is Direct Connect cheaper than the internet? A: Not necessarily. While Direct Connect can reduce data transfer costs (egress fees are often lower compared to the public internet), you must factor in the monthly port fee and the costs of the physical cross-connect. It is usually a cost-effective choice for organizations with high data transfer volumes.
Q: Can I change my bandwidth later? A: If you have a dedicated connection, you generally cannot change the speed of an existing physical port. You would need to provision a new connection at the higher speed and migrate your traffic. Hosted connections, however, may offer more flexibility depending on the partner.
Key Takeaways
- Predictability is Key: Direct Connect moves your traffic off the unpredictable public internet and onto a dedicated, private path, ensuring consistent latency and throughput.
- BGP is Essential: A deep understanding of BGP is required to manage Direct Connect. It is the protocol that allows your network and AWS to communicate and share routing information dynamically.
- Resiliency is Non-Negotiable: For production systems, always plan for failure. Use dual locations, dual providers, or a VPN backup to ensure your business remains connected during a potential outage.
- Choose the Right VIF: Match the VIF type to your architectural needs. Use Private VIFs for standard VPC access, Public VIFs for AWS services, and Transit VIFs for complex, multi-VPC environments.
- Security Matters: Remember that Direct Connect is not encrypted by default. If your data requires high security, look into MACsec or an IPsec VPN overlay.
- Monitor and Automate: Treat your Direct Connect infrastructure as code and monitor it continuously with CloudWatch. Proactive monitoring helps you catch issues before they impact your users.
- Plan for Growth: If you anticipate your cloud footprint growing, start with a Transit Gateway architecture. It provides the most flexibility and scalability for connecting multiple VPCs and on-premises sites.
By following these principles, you will be well-equipped to design, implement, and maintain a robust Direct Connect architecture that supports the needs of your organization today and in the future. Network design in the cloud is not a one-time task; it is an ongoing process of refinement and optimization, and Direct Connect is the most powerful tool you have to build a reliable bridge to the cloud.
Reach the last section to complete this lesson and earn points — you're on section 1 of 11.
- AWS Organizations Network Architecture
- AWS Organizations Network Architecture Quiz5q
- Multi-Account VPC Strategy
- Multi-Account VPC Strategy Quiz5q
- Cross-Region Network Connectivity
- Cross-Region Network Connectivity Quiz5q
- Transit Gateway Cross-Region Peering
- Transit Gateway Cross-Region Peering Quiz5q
- Global Accelerator for Multi-Region
- Global Accelerator for Multi-Region Quiz5q
- Route 53 Routing Policies
- Route 53 Routing Policies Quiz5q
- AWS Direct Connect Architecture
- AWS Direct Connect Architecture Quiz5q
- Direct Connect Gateway Design
- Direct Connect Gateway Design Quiz5q
- Site-to-Site VPN Design Patterns
- Site-to-Site VPN Design Patterns Quiz5q
- VPN over Direct Connect
- VPN over Direct Connect Quiz5q
- Transit Gateway with Hybrid Networks
- Transit Gateway with Hybrid Networks Quiz5q
- BGP Routing for Hybrid Connectivity
- BGP Routing for Hybrid Connectivity Quiz5q
- VPC Design Patterns
- VPC Design Patterns Quiz5q
- Subnet Strategies and CIDR Planning
- Subnet Strategies and CIDR Planning Quiz5q
- Network ACLs Design
- Network ACLs Design Quiz5q
- Security Group Architectures
- Security Group Architectures Quiz5q
- VPC Endpoints Strategy
- VPC Endpoints Strategy Quiz5q
- AWS PrivateLink Design
- AWS PrivateLink Design Quiz5q
- Multi-AZ Network Architectures
- Multi-AZ Network Architectures Quiz5q
- Elastic Load Balancing Design
- Elastic Load Balancing Design Quiz5q
- Application Load Balancer Features
- Application Load Balancer Features Quiz5q
- Network Load Balancer Use Cases
- Network Load Balancer Use Cases Quiz5q
- Gateway Load Balancer Design
- Gateway Load Balancer Design Quiz5q
- DNS Failover Strategies
- DNS Failover Strategies Quiz5q
- VPC Creation and Configuration
- VPC Creation and Configuration Quiz5q
- VPC Peering Implementation
- VPC Peering Implementation Quiz5q
- Transit Gateway Implementation
- Transit Gateway Implementation Quiz5q
- VPC Endpoint Configuration
- VPC Endpoint Configuration Quiz5q
- NAT Gateway and NAT Instance
- NAT Gateway and NAT Instance Quiz5q
- Internet Gateway and Egress-Only IGW
- Internet Gateway and Egress-Only IGW Quiz5q
- VPC Flow Logs Configuration
- VPC Flow Logs Configuration Quiz5q
- Direct Connect Setup
- Direct Connect Setup Quiz5q
- Virtual Interfaces Configuration
- Virtual Interfaces Configuration Quiz5q
- Direct Connect Resiliency
- Direct Connect Resiliency Quiz5q
- Site-to-Site VPN Configuration
- Site-to-Site VPN Configuration Quiz5q
- Customer Gateway Setup
- Customer Gateway Setup Quiz5q
- VPN Monitoring and Troubleshooting
- VPN Monitoring and Troubleshooting Quiz5q
- CloudHub Implementation
- CloudHub Implementation Quiz5q
- Route 53 Hosted Zones
- Route 53 Hosted Zones Quiz5q
- Route 53 Health Checks
- Route 53 Health Checks Quiz5q
- Route 53 Resolver
- Route 53 Resolver Quiz5q
- CloudFront Distribution Setup
- CloudFront Distribution Setup Quiz5q
- CloudFront Origin Configuration
- CloudFront Origin Configuration Quiz5q
- Lambda@Edge Implementation
- Lambda@Edge Implementation Quiz5q
- CloudFront Security Features
- CloudFront Security Features Quiz5q
- VPC Flow Logs Analysis
- VPC Flow Logs Analysis Quiz5q
- CloudWatch for Network Monitoring
- CloudWatch for Network Monitoring Quiz5q
- Network Manager Overview
- Network Manager Overview Quiz5q
- Traffic Mirroring
- Traffic Mirroring Quiz5q
- Reachability Analyzer
- Reachability Analyzer Quiz5q
- Network Access Analyzer
- Network Access Analyzer Quiz5q
- CloudFormation for Networking
- CloudFormation for Networking Quiz5q
- AWS CDK for Network Infrastructure
- AWS CDK for Network Infrastructure Quiz5q
- Terraform for AWS Networking
- Terraform for AWS Networking Quiz5q
- AWS Config for Network Compliance
- AWS Config for Network Compliance Quiz5q
- Systems Manager for Network Management
- Systems Manager for Network Management Quiz5q
- Security Groups Best Practices
- Security Groups Best Practices Quiz5q
- Network ACLs Best Practices
- Network ACLs Best Practices Quiz5q
- AWS Network Firewall
- AWS Network Firewall Quiz5q
- AWS WAF Implementation
- AWS WAF Implementation Quiz5q
- AWS Shield Standard and Advanced
- AWS Shield Standard and Advanced Quiz5q
- DDoS Mitigation Strategies
- DDoS Mitigation Strategies Quiz5q
- TLS/SSL Implementation
- TLS/SSL Implementation Quiz5q
- VPN Encryption Options
- VPN Encryption Options Quiz5q
- Direct Connect Encryption
- Direct Connect Encryption Quiz5q
- Certificate Manager Integration
- Certificate Manager Integration Quiz5q
- PrivateLink for Secure Access
- PrivateLink for Secure Access Quiz5q
- Macie for Network Data
- Macie for Network Data Quiz5q
- Network Compliance Frameworks
- Network Compliance Frameworks Quiz5q
- AWS Config Network Rules
- AWS Config Network Rules Quiz5q
- IAM for Network Resources
- IAM for Network Resources Quiz5q
- Service Control Policies for Networking
- Service Control Policies for Networking Quiz5q
- Resource Access Manager
- Resource Access Manager Quiz5q
- Network Audit and Reporting
- Network Audit and Reporting Quiz5q
- GuardDuty for Network Threats
- GuardDuty for Network Threats Quiz5q
Enjoying the courses?
Everything stays free. Pro shows fewer ads, doubles the points you earn on every lesson and quiz so you progress twice as fast, unlocks half of every practice exam — plus full case studies — with the Learn & Exam study modes, and lets you read each lesson on one page.
- ✓ Fewer advertisements
- ✓ 2× points per lesson & quiz
- ✓ 50% of every exam unlocked
- ✓ Learn & Exam modes
- ✓ Distraction-free lessons