Lesson 1 of 4 Hybrid Connectivity and Zero-Trust Access

Securing Site-to-Site VPN Connections

This lesson explains how AWS Site-to-Site VPN connects on-premises networks to AWS with encrypted IPsec tunnels over the internet. It is quick to set up and encrypted by design, which makes it both a primary link and the usual backup for Direct Connect.

Learning outcomes

After completing this lesson, you will be able to:

  • Compare Site-to-Site VPN with Direct Connect.
  • Harden tunnel options with strong IKE versions and algorithms.
  • Explain why both tunnels and hybrid DNS resolution matter for resilience.

VPN and Direct Connect compared

Site-to-Site VPN and Direct Connect both connect on-premises networks to AWS. A Site-to-Site VPN creates two IPsec tunnels over the internet to a virtual private gateway or transit gateway, so traffic is encrypted. It can be set up in minutes, but a standard tunnel carries about 1.25 Gbps (large bandwidth tunnels, available since November 2025 on transit gateway and Cloud WAN connections, carry up to 5 Gbps), and internet performance varies; equal-cost multi-path (ECMP) routing on a transit gateway combines tunnels for more throughput. Accelerated VPN routes traffic through Global Accelerator edge locations for a more stable path.

Direct Connect is a private, dedicated connection, from 1 to 400 Gbps for dedicated connections, or smaller hosted connections through a partner, with consistent bandwidth and latency. It takes weeks to provision and is not encrypted by default, which is a frequent exam point. A VPN is often used as a backup for Direct Connect. The following table summarises the differences.

Site-to-Site VPN
PathTwo IPsec tunnels over the internet to a virtual private gateway or transit gateway
EncryptionYes
ThroughputAbout 1.25 Gbps per standard tunnel (5 Gbps for large bandwidth tunnels); ECMP on a transit gateway aggregates more
SetupQuick; Accelerated VPN uses Global Accelerator edges
Direct Connect
PathPrivate, dedicated connection (1 to 400 Gbps dedicated, or hosted)
EncryptionNot by default
ThroughputConsistent bandwidth and latency
SetupWeeks

1.25Gbps

About how much one standard VPN tunnel carries

400Gbps

Fastest dedicated Direct Connect connection

Sort into groups

Site-to-Site VPN or Direct Connect?

Exam skills 3.3.2

Decide which hybrid connection each statement describes.

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

Security settings

VPN tunnels have security options that can be tightened. The following list describes them.

  • Restrict tunnel options to strong IKE versions, encryption and integrity algorithms, and Diffie-Hellman groups.
  • Use certificate-based authentication from AWS Private CA instead of pre-shared keys where possible.
  • Store pre-shared keys in Secrets Manager rather than in configuration files.
  • Enable tunnel logging to CloudWatch Logs for troubleshooting and audit.
Select all that apply

Hardening VPN tunnels

Exam skills 3.3.2

Pick the settings that strengthen a Site-to-Site VPN.

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

Resilience and naming

Each connection has two tunnels in different Availability Zones, and both should be configured on the customer gateway. Route 53 Resolver inbound and outbound endpoints resolve names between on premises and AWS, and other clouds connect by VPN or partner interconnect to a transit gateway.

The following diagram lists the hardened options of a Site-to-Site VPN tunnel and the value allowed for each.

Hardened Site-to-Site VPN tunnel options. Only IKEv2, AES256-GCM-16, SHA2-384 and Diffie-Hellman group 20 are accepted in both phases, and tunnel logs go to CloudWatch Logs. The customer gateway is configured to match first, and the same change is applied to the second tunnel.
The scenario is illustrative.
True or false

VPN resilience and naming

Exam skills 3.3.2

Check how VPN connections stay resilient and resolve names.

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

Hardening VPN tunnel options

A security review finds that a Site-to-Site VPN accepts older IKE versions and weak algorithms. The tunnel options are restricted to strong choices on both tunnels:

aws ec2 modify-vpn-tunnel-options --vpn-connection-id vpn-0abc \
  --vpn-tunnel-outside-ip-address 203.0.113.10 \
  --tunnel-options '{
    "IKEVersions": [{"Value": "ikev2"}],
    "Phase1EncryptionAlgorithms": [{"Value": "AES256-GCM-16"}],
    "Phase2EncryptionAlgorithms": [{"Value": "AES256-GCM-16"}],
    "Phase1IntegrityAlgorithms": [{"Value": "SHA2-384"}],
    "Phase2IntegrityAlgorithms": [{"Value": "SHA2-384"}],
    "Phase1DHGroupNumbers": [{"Value": 20}],
    "Phase2DHGroupNumbers": [{"Value": 20}],
    "LogOptions": {"CloudWatchLogOptions": {"LogEnabled": true,
       "LogGroupArn": "arn:aws:logs:eu-west-1:111111111111:log-group:/vpn/tunnels"}}
  }'

The same change is applied to the second tunnel, and the customer gateway is configured to match before the change, so the tunnels re-establish with the stronger settings. Tunnel logs in CloudWatch Logs show negotiation failures if the two sides disagree.

Check yourself

What is a common backup path for Direct Connect?

Show answer

A Site-to-Site VPN.

Exam Tips

Remember for the exam

  • For quick setup of encrypted connectivity over the internet, use a Site-to-Site VPN.
  • A backup path for Direct Connect is a Site-to-Site VPN.
  • Configure both tunnels on the customer gateway.
  • Restrict tunnel options to strong algorithms and use certificate authentication where possible.
  • For more than 1.25 Gbps, use large bandwidth tunnels or ECMP across tunnels on a transit gateway.