Lesson 3 of 5 VPC Connectivity and Hybrid Networking

Connecting On-Premises Networks with AWS Site-to-Site VPN

This lesson explains how Site-to-Site VPN connects an on-premises network to AWS with encrypted IPsec tunnels over the internet, set up in hours at low cost.

Learning outcomes

After completing this lesson, you will be able to:

  • Identify the components of a Site-to-Site VPN.
  • Explain how VPN throughput and performance are increased.
  • Choose between VPN and Direct Connect.

Components

An AWS Site-to-Site VPN connection links an on-premises network to AWS over encrypted IPsec tunnels across the internet. On the customer side, a customer gateway resource represents the customer's router or firewall. On the AWS side, the connection terminates on a virtual private gateway, which serves one VPC, or on a transit gateway, which serves many.

Each connection has two IPsec tunnels to different AWS endpoints, each supporting up to 1.25 Gbps as standard, with static or BGP routing. Both tunnels should be configured on the customer device: AWS performs maintenance on one tunnel at a time, so a connection using only one tunnel drops during maintenance. The TunnelState CloudWatch metric shows whether each tunnel is up and should be alarmed on.

The following diagram shows the components of a connection.

The components of a Site-to-Site VPN connection. The customer gateway resource represents the on-premises router or firewall. The connection has two IPsec tunnels to different AWS endpoints, each up to 1.25 Gbps, ending on a virtual private gateway for one VPC or a transit gateway for many. Both tunnels should be configured, because AWS maintains one tunnel at a time.
ECMP across the tunnels of several connections to a transit gateway can aggregate more bandwidth than one tunnel provides.
True or false

VPN components

Exam skills 1.2.4

Check how a Site-to-Site VPN connection is built.

Log in to try this activity Interactive activities are free with an account.

Going further

Each Site-to-Site VPN connection has two encrypted tunnels for redundancy, each limited to about 1.25 Gbps as standard. Several features extend this. Since November 2025, large bandwidth tunnels of up to 5 Gbps each are available for connections to a transit gateway or AWS Cloud WAN, but not to a virtual private gateway. When the VPN terminates on a transit gateway, ECMP (equal-cost multi-path routing) spreads traffic across several tunnels and connections, so bandwidth can exceed one tunnel's limit. Accelerated Site-to-Site VPN enters the AWS network at the nearest Global Accelerator edge location instead of crossing the internet all the way, which gives more consistent performance; it is available only with a transit gateway.

VPN CloudHub connects several branch offices to one virtual private gateway, so the offices can also communicate with one another. A VPN is a common, inexpensive backup for Direct Connect, taking over if the dedicated link fails. Conversely, an IPsec VPN over Direct Connect adds encryption to the private link, which is unencrypted by default. The following table summarises these features.

FeatureBenefit
Large bandwidth tunnelsUp to 5 Gbps per tunnel (transit gateway or Cloud WAN only)
ECMP on a transit gatewayAggregate several tunnels beyond one tunnel's limit
Accelerated Site-to-Site VPNRoutes through Global Accelerator edge locations for more consistent performance (transit gateway only)
VPN CloudHubBranch offices communicate with each other through one virtual private gateway
VPN as Direct Connect backupA cheap failover path
IPsec VPN over Direct ConnectAdds encryption to the private link
Match the pairs

VPN features

Exam skills 1.2.4 · 4.4.7

Match each requirement with the Site-to-Site VPN feature that meets it.

Log in to try this activity Interactive activities are free with an account.

VPN or Direct Connect?

Site-to-Site VPN and Direct Connect both connect an on-premises network to AWS, and the choice usually turns on time, performance and cost. A Site-to-Site VPN runs encrypted over the internet and can be set up in hours, so it suits urgent needs, low-cost connectivity and backup paths. Because it crosses the internet, its latency and throughput vary.

Direct Connect is a private, dedicated network link from a Direct Connect location to AWS. Ordering and installing it takes weeks or months, but it gives consistent bandwidth and latency, and data sent out of AWS over it costs less per gigabyte, which suits large, steady data volumes. The link is not encrypted by default; encryption is added with MACsec on supported connections or with a VPN over the link. The following table summarises the differences.

Site-to-Site VPN
Set-up timeHours
PathInternet, encrypted
PerformanceVariable
CostLow
Direct Connect
Set-up timeWeeks or months
PathPrivate dedicated link, unencrypted by default
PerformanceConsistent
CostHigher fixed cost, lower per-GB transfer
Worked example

Connecting a new office this week

A company opens a branch office that needs secure access to applications in AWS within days, and staff working from home need access too.

NeedSolutionNotes
The office network to AWSAWS Site-to-Site VPN to a transit gatewayTwo IPsec tunnels for redundancy; ready in hours
Individual remote workersAWS Client VPNAuthenticated with Active Directory or SAML
More bandwidth laterSeveral VPN connections with ECMP, or Direct ConnectA standard tunnel provides about 1.25 Gbps; large bandwidth tunnels on a transit gateway up to 5 Gbps

A VPN is the quick answer whenever a question stresses speed of setup and encryption over the internet; Direct Connect takes weeks to provision.

Check yourself

How many tunnels does a Site-to-Site VPN connection have, and why?

Show answer

Two, each ending in a different Availability Zone, so the connection survives the failure of one tunnel endpoint.

Exam Tips

Remember for the exam

  • For an encrypted hybrid connection that can be set up in hours, use a Site-to-Site VPN.
  • For higher VPN throughput, use several tunnels with ECMP on a transit gateway.
  • If the VPN drops during AWS maintenance, configure both tunnels on the customer gateway.
  • For a cheap backup to Direct Connect, use a Site-to-Site VPN.
  • For branch offices to communicate with each other through AWS, use VPN CloudHub.