Alternative to AWS Direct Connect: Hybrid Link Using WireGuard and BGP
This article explores a cost-effective and flexible alternative to AWS Direct Connect using WireGuard and BGP for dynamically-routed hybrid links. It outlines the setup, key considerations, and implementation details.

AWS Direct Connect offers deterministic latency and a contractual SLA but comes with lead times, cross-connect fees, and port charges starting around $220/month for a 1 Gbps hosted connection. Teams needing a reliable hybrid link quickly may turn to alternatives. A production-grade solution involves two redundant WireGuard tunnels between an on-premise datacenter and an AWS Transit Gateway, with BGP via FRRouting for dynamic routing and sub-second failover. Before building custom solutions, AWS Site-to-Site VPN is recommended as the default option due to its cost-effectiveness and ease of use, costing around $36/month. However, WireGuard may be preferred for higher throughput, custom cryptographic control, or multi-cloud symmetry (Dev.to, 2023). [1]
The target architecture involves two WireGuard appliances in AWS, in two Availability Zones, and two gateways on-premise in different racks. Four tunnels in a full mesh are not necessary; two tunnels with BGP is sufficient. The non-obvious aspect of the setup is how the AWS appliances inject routes into the Transit Gateway. A plain EC2 instance cannot BGP-peer with a TGW, but Transit Gateway Connect exposes a GRE transport over an existing VPC attachment and runs BGP inside it, turning a pair of EC2 boxes into a dynamically-routed hybrid edge. The architecture includes on-prem 10.10.0.0/16, Internet transit VPC 10.42.0.0/16, and a Transit Gateway connecting to spoke VPCs and OpenShift clusters (Dev.to, 2023). [1]
Sizing and performance considerations are critical for WireGuard. A modern vCPU can handle approximately 1 Gbps with ChaCha20-Poly1305 encryption. For 1–2 Gbps links, c6gn.large is the sweet spot, and for x86-based instances, c6in.xlarge is recommended. Small packets can significantly impact performance, and enabling multi-queue and pinning IRQs is essential. Data transfer out to the internet costs $0.09/GB, which is the same as a VPN but roughly 4× the cost of Direct Connect. Calculating this cost before committing is crucial. The MTU must be set to 1420 to avoid throughput loss, and the arithmetic must be exact. The path MTU should be verified using ping commands before implementation (Dev.to, 2023). [1]
AWS Direct Connect offers deterministic latency and a contractual SLA but comes with lead times, cross-connect fees, and port charges starting around $220/month for a 1 Gbps hosted connection. For organizations that require a reliable hybrid link but find Direct Connect unaffordable or too slow, WireGuard provides a dynamic and scalable alternative. This article outlines a production-grade configuration involving two redundant WireGuard tunnels between an on-premise datacenter and an AWS Transit Gateway, using BGP via FRRouting for dynamic routing and sub-second failover. This setup is particularly useful when throughput, key control, or multi-cloud symmetry are critical considerations. [1]
Advertisement
The target architecture involves two WireGuard appliances in AWS, in two Availability Zones, and two gateways on-premise in different racks. This configuration ensures redundancy and minimizes single points of failure. Sizing and performance considerations are critical for WireGuard, as throughput depends on factors such as instance type, packet size, and MTU settings. It is recommended to use instances with high packet-per-second ceilings and ENA Express, such as c6gn.large, to achieve optimal performance for 1–2 Gbps links. Additionally, the MTU must be set to 1420 to avoid throughput degradation due to packet fragmentation or PMTUD failures. [1]
Configuration of the WireGuard appliances requires careful attention to the AllowedIPs parameter, which acts as a cryptographic ACL. This parameter must be set tightly to the expected aggregates and should not include 0.0.0.0/0 to prevent spoofing attacks. Additionally, BFD (Bidirectional Forwarding Detection) is mandatory to ensure fast failover in case of link failure. Without BFD, failover could take 90–180 seconds, which is far too slow for most applications. Finally, the AWS side must be wired using Transit Gateway Connect to enable dynamic routing and eliminate the need for static routes or Lambda-driven route table rewrites. [1]
Sources
Prepared with AI assistance from the cited sources.
The Cali Reporter newsletter
The stories worth your time.
California, the country, and what comes next. Join our free newsletter for reporting that keeps you informed.
More in Technology
- Modern Web Guidance 1.0 and Browser Compatibility
Modern Web Guidance 1.0, announced by Chrome for Developers on November 10, introduces browser compatibility data to assist coding agents in building web features. The initiative emphasizes the importance of fallback…
- Apache mod_http2 Vulnerability Detection with Nmap
A new Nmap scripting module has been developed to detect the Apache mod_http2 vulnerability (CVE-2026-119618), addressing the challenges of identifying affected systems accurately.
- Securing Remote Vendor Access in Industrial Networks
Best practices for managing remote vendor access in operational technology (OT) networks emphasize controlled access points, multifactor authentication, and time-bound sessions to reduce cybersecurity risks.
