Designing AWS Site-to-Site VPN Connectivity
This lesson explains how AWS Site-to-Site VPN provides encrypted IPsec connectivity over the internet, set up in minutes, for sites that do not justify Direct Connect and as a backup for Direct Connect.
Learning outcomes
After completing this lesson, you will be able to:
- Describe connections with two tunnels and dynamic routing.
- Choose between accelerated VPN, private IP VPN and other variants.
- Explain how a VPN backs up Direct Connect.
- Describe how many branches connect to many VPCs.
Connection design
Each Site-to-Site VPN connection has two IPsec tunnels that terminate on different AWS devices in different Availability Zones, so AWS maintenance or a device failure takes down at most one tunnel. The customer gateway device must configure both tunnels, or the connection has no redundancy. On the AWS side, the connection terminates on a virtual private gateway, which serves one VPC, on a transit gateway, which serves many VPCs, or on a Cloud WAN core network.
A standard tunnel carries up to 1.25 Gbps. Since November 2025, large bandwidth tunnels carry up to 5 Gbps each, but only on connections to a transit gateway or Cloud WAN, not to a virtual private gateway. On a transit gateway, ECMP spreads traffic across several tunnels and connections to aggregate more bandwidth, which requires BGP; a virtual private gateway uses one tunnel at a time. Dynamic routing with BGP is preferred in any case, because it detects a failed tunnel and moves traffic automatically; static routing is for customer devices that cannot run BGP.
Options for particular needs
Four Site-to-Site VPN variants address particular needs. Accelerated VPN brings tunnels onto the AWS network at the nearest Global Accelerator edge location, giving more consistent performance over long distances; it requires a transit gateway. Private IP VPN runs IPsec over a Direct Connect transit VIF, encrypting Direct Connect traffic at layer 3 without using the internet. VPN CloudHub lets several sites communicate with each other through one virtual private gateway, in a hub-and-spoke model. Certificate-based authentication authenticates tunnels with certificates from AWS Private CA instead of pre-shared keys, which supports customer gateways with dynamic IP addresses. The following table summarises the options.
| Option | What it provides |
|---|---|
| Accelerated VPN | Tunnels enter the AWS network at the nearest Global Accelerator edge location, for more consistent performance over long distances (transit gateway only) |
| Private IP VPN | IPsec over a Direct Connect transit VIF, to encrypt Direct Connect traffic at layer 3 |
| VPN CloudHub | Several sites communicate with each other through one virtual private gateway in a hub-and-spoke model |
| Certificate-based authentication | Tunnels authenticate with certificates from AWS Private CA instead of pre-shared keys, for customer gateways with dynamic IP addresses |
VPN as a Direct Connect backup
A Site-to-Site VPN is the usual low-cost backup for Direct Connect. The VPN attaches to the same transit gateway or virtual private gateway as the Direct Connect path and advertises the same prefixes. AWS prefers Direct Connect routes over VPN routes for the same prefix, so in normal operation all traffic uses Direct Connect, and when the Direct Connect BGP session fails, its routes are withdrawn and traffic moves to the VPN automatically.
The VPN is usually sized for the critical traffic that must continue during an outage rather than for the full Direct Connect bandwidth, and the on-premises router must also prefer Direct Connect for outbound traffic, so that traffic in both directions uses the same path.
Connecting 30 branches
A retailer has a headquarters on Direct Connect and 30 small branches with ordinary internet links. Branches must reach applications in 12 VPCs and each other, and the network must be simple to extend. Each branch router establishes a Site-to-Site VPN to the transit gateway with BGP, so new VPCs become reachable as soon as their attachments propagate routes. The headquarters' Direct Connect transit VIF connects to the same transit gateway through a Direct Connect gateway, with a VPN as backup.
Branch-to-branch traffic flows through the transit gateway, replacing the older CloudHub design on a virtual private gateway, which could not reach multiple VPCs. Distant branches use Accelerated VPN to reduce jitter on the internet path.
A standard VPN tunnel carries up to 1.25 Gbps. How is more VPN bandwidth to a transit gateway achieved?
Show answer
With large bandwidth tunnels of up to 5 Gbps each, or with equal-cost multi-path routing (ECMP) across several tunnels and VPN connections, which spreads traffic among them.
Exam Tips
Remember for the exam
- Each Site-to-Site VPN has two tunnels; configure both for redundancy.
- For more than 1.25 Gbps over VPN, use large bandwidth tunnels (up to 5 Gbps) or ECMP across several tunnels on a transit gateway.
- For more consistent VPN performance over long distances, use Accelerated VPN on a transit gateway.
- For branch-to-branch communication through AWS, use a transit gateway (or VPN CloudHub on a VGW).
- To encrypt Direct Connect at layer 3, run a private IP VPN over a transit VIF.
- With BGP, Direct Connect routes are preferred over VPN routes, which makes VPN a natural backup.