- Newest
- Most votes
- Most comments
Your approach is correct. Please also consider the following:
- In order for DX to be preferred over VPN for traffic sent from AWS to your on-premises, the prefixes received across both connections need to either be the same or more specific on the DX connection. BGP attributes (AS Path prepending, MED) will not influence this decision. These attributes will only come into play when the routing decision needs to be made between two attachments of the same type. i.e you cannot use these attributes to prefer DX over VPN or vice versa. AWS will always prefer DX over VPN when the prefixes are the same and if both prefixes are received via BGP.
- To ensure that DX is preferred for traffic you send to AWS from on-premises, you can use the BGP attribute local preference in the event that prefixes advertised from AWS are the same or more specific on the VPN connection.
- Ensure to size the VPN connections correctly such that in the event of a failover you do not experience bandwidth contention and possibly packet drops. For high bandwidth requirements AWS now supports VPN connections with up to 5 Gbps per tunnel
- Ensure that your routing configuration does not cause asymmetric routing where this is not desired
Your proposed approach for VPN failover with your dual Direct Connect setup is on the right track, but I can provide some additional guidance to ensure it works as expected.
For your specific architecture with dual DX connections, DX Gateway, and multi-region Transit Gateways, AWS recommends using Site-to-Site VPN terminating on an AWS Transit Gateway as a backup for mission-critical workloads. This is exactly what you're proposing.
To implement this properly:
- Create a Site-to-Site VPN attachment to your Transit Gateway in us-east-2 (since that's your primary production region)
- Configure two VPN tunnels as part of this connection for high availability, with each tunnel terminating in a different Availability Zone
- Use BGP for dynamic routing over the VPN connection
For route preference to ensure DX is always the primary path:
- BGP path selection will naturally prefer Direct Connect over VPN due to AS path length when both are available
- You can further influence route selection by using BGP attributes:
- AS path prepending on the VPN connection (adding extra AS numbers to make the path appear longer)
- Adjusting MED (Multi-Exit Discriminator) values
- Setting higher local preference values for DX routes
To avoid route conflicts when the same prefixes are learned via both DXGW and VPN attachments, ensure your Transit Gateway route tables are properly configured. The TGW will automatically handle route preference based on BGP attributes, so with proper configuration, there shouldn't be conflicts - it will prefer DX when available and fall back to VPN when needed.
For additional resilience, consider:
- Using redundant customer gateway devices for your VPN connection
- Ensuring your on-premises VPN endpoints have multiple internet connections from different ISPs
- Configuring Equal-Cost Multi-Path (ECMP) routing across multiple VPN tunnels for increased throughput (up to 50Gbps, though each tunnel is capped at 1.25 Gbps)
This approach aligns with AWS best practices for providing VPN failover in a multi-region TGW + DXGW architecture, particularly for your us-east-2 production region.
Sources
Redundant AWS Site-to-Site VPN connections for failover - AWS Site-to-Site VPN
AWS Direct Connect | Create resilient hybrid networks | AWS
REL02-BP02 Provision redundant connectivity between private networks in the cloud and on-premises environments - AWS Well-Architected Framework
Relevant content
- asked 6 years ago
- asked 6 years ago
- AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated 10 months ago
