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.
1.25Gbps
About how much one standard VPN tunnel carries
400Gbps
Fastest dedicated Direct Connect connection
Site-to-Site VPN or Direct Connect?
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.
Hardening VPN tunnels
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.

VPN resilience and naming
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.
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.