AWS Site-to-Site VPN: Securely Connecting On-Premises to AWS


As organizations move towards hybrid cloud architectures, the need for secure and reliable connectivity between on-premises infrastructure and AWS becomes crucial. AWS Site-to-Site VPN is a cost-effective solution that enables encrypted communication between on-premises networks and AWS resources.
What is AWS Site-to-Site VPN?
AWS Site-to-Site VPN (previously called AWS VPN) is a managed VPN service that securely connects an on-premises network to an Amazon Virtual Private Cloud (VPC). It uses IPSec tunnels to encrypt traffic and protect data in transit. The service automatically provisions redundant VPN tunnels over the internet to ensure high availability.
Key Components:
Customer Gateway (CGW): A VPN endpoint on the customer's on-premises network, typically a physical or virtual router/firewall.
Virtual Private Gateway (VGW) or AWS Transit Gateway (TGW): The AWS side of the VPN connection that securely terminates VPN traffic.
VPN Connection: Ensures a secure and encrypted connection with IPSec protocol between on-premises and AWS.
How AWS Site-to-Site VPN Works
Create a Virtual Private Gateway (VGW) or use a Transit Gateway (TGW).
A virtual private gateway is the VPN concentrator on the Amazon side of the Site-to-Site VPN connection. You create a virtual private gateway and attach it to a virtual private cloud (VPC) with resources that must access the Site-to-Site VPN connection.
A transit gateway is a transit hub that you can use to interconnect your VPCs and your on-premises networks. For more information, see Amazon VPC Transit Gateways. You can create a Site-to-Site VPN connection as an attachment on a transit gateway.
Define a Customer Gateway (CGW) with the public IP address of your on-premises VPN endpoint.
A customer gateway is a resource that you create in AWS that represents the customer gateway device in your on-premises network. When you create a customer gateway, you provide information about your device to AWS. For more information, see Customer gateway options for your AWS Site-to-Site VPN connection.
Establish a VPN Connection between the AWS Virtual Private Gateway or Transit Gateway and the Customer Gateway.
Configure IPSec Tunnels to enable encrypted communication.
Route traffic between on-premises networks and AWS subnets using static or dynamic routing (BGP support).
Use Cases of AWS Site-to-Site VPN
AWS Site-to-Site VPN is commonly used in hybrid cloud and secure networking scenarios:
1. Hybrid Cloud Connectivity
Businesses running both on-premises data centers and AWS resources can use Site-to-Site VPN for secure communication between workloads.
Example: A financial company needing secure access to AWS-hosted applications from its on-premises servers.
2. Backup and Disaster Recovery
Organizations can replicate on-premises data to AWS S3, EBS, or RDS over a secure VPN tunnel.
Example: A healthcare company maintaining offsite backups in AWS for compliance.
3. Remote Office Connectivity
Businesses with multiple branch offices can securely connect them to AWS without investing in dedicated leased lines.
Example: A retail company linking multiple stores to AWS-hosted inventory management systems.
4. Secure Access to AWS Resources
VPN can provide encrypted access to AWS services like Amazon RDS, S3, or EC2 instances.
Example: A development team connecting on-premises CI/CD servers to AWS databases securely.
5. MPLS Alternative for Cost Savings
Companies using expensive MPLS networks can use AWS Site-to-Site VPN as a cost-effective alternative.
Example: A logistics company replacing MPLS with VPN for warehouse connectivity.
AWS Site-to-Site VPN vs Other AWS Connectivity Solutions
AWS provides multiple connectivity solutions, and choosing the right one depends on performance, security, and cost considerations.
Feature | AWS Site-to-Site VPN | AWS Direct Connect | AWS Transit Gateway | AWS Client VPN |
Use Case | Securely connects on-premises to AWS over the internet | Dedicated private connection from on-premises to AWS | Connects multiple VPCs, on-premises, and AWS accounts | Provides VPN access for remote users |
Performance | Medium (depends on internet speed) | High (1 Gbps to 100 Gbps) | Medium to High | Low to Medium |
Security | Encrypted via IPSec | Private connection (can be combined with VPN) | Encrypted if VPN is used | Encrypted VPN |
Availability | Redundant tunnels | Highly available | Highly available | Redundant connections possible |
Cost | Lower cost, pay-as-you-go | Higher upfront cost | Medium (charged per attachment) | Pay-as-you-go per connection |
Setup Complexity | Simple, requires VPN configuration | Requires physical setup with AWS partner | Moderate, needs route configuration | Simple setup via AWS Console |
Key Differences
AWS Direct Connect provides a dedicated private connection with higher speeds and lower latency than Site-to-Site VPN.
AWS Transit Gateway allows multiple VPCs and VPN connections to be managed centrally.
AWS Client VPN is designed for individual users needing secure access to AWS resources, while Site-to-Site VPN is for network-to-network connections.
When to Choose AWS Site-to-Site VPN?
AWS Site-to-Site VPN is a great choice if:
You need secure connectivity between on-premises and AWS.
You want a quick and cost-effective solution without investing in dedicated infrastructure.
Your applications can tolerate internet-based latency and bandwidth limitations.
You are looking for a backup connectivity option for AWS Direct Connect.
However, if your workloads require high throughput, ultra-low latency, or private connectivity, AWS Direct Connect is a better choice.
Summary
AWS Site-to-Site VPN is a secure, scalable, and cost-efficient way to connect on-premises environments to AWS. Whether for hybrid cloud, disaster recovery, or branch office connectivity, it provides a reliable solution for businesses looking to integrate AWS with their existing infrastructure.
Choosing the right AWS connectivity option depends on your use case, budget, and performance requirements. If you need a fast, private link, AWS Direct Connect is preferable. If you want to manage multiple VPNs and VPCs efficiently, AWS Transit Gateway is a better fit. For remote user access, AWS Client VPN is the right solution.
References
Subscribe to my newsletter
Read articles from Maxat Akbanov directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by

Maxat Akbanov
Maxat Akbanov
Hey, I'm a postgraduate in Cyber Security with practical experience in Software Engineering and DevOps Operations. The top player on TryHackMe platform, multilingual speaker (Kazakh, Russian, English, Spanish, and Turkish), curios person, bookworm, geek, sports lover, and just a good guy to speak with!