- Newest
- Most votes
- Most comments
Unfortunately, there isn't a straightforward way to implement dynamic routing for a non-BGP device in an AWS Site-to-Site VPN setup. Dynamic routing in AWS VPN connections typically relies on BGP (Border Gateway Protocol) to exchange routing information automatically.
For devices that don't support BGP, static routing is the primary option. Your proposed solution of using a Lambda function to change static routes is a viable workaround, but it's not truly dynamic in the networking sense.
Here are a few considerations and potential alternatives:
-
If possible, consider upgrading or replacing the non-BGP device with one that supports BGP. This would allow you to use dynamic routing as intended, providing more flexibility and automatic failover capabilities.
-
If you must keep the non-BGP device, your Lambda function approach could work, but be aware of potential delays in route propagation and the need for careful management of the Lambda function's triggers and error handling.
-
You might consider implementing a software-based routing solution on an EC2 instance that can act as an intermediary between your Transit Gateway and the non-BGP device. This instance could potentially run a routing protocol like OSPF internally while maintaining a static route to the non-BGP device.
-
Another option could be to use AWS Direct Connect along with your Site-to-Site VPN. Direct Connect provides more stable and predictable routing, which might mitigate some of the issues you're trying to solve with dynamic routing.
-
If your goal is primarily for failover purposes, you might explore using AWS Global Accelerator with your VPN connections. While not a routing solution per se, it can provide some traffic management capabilities that might meet your needs.
Remember that any solution involving programmatic changes to your network configuration should be thoroughly tested and monitored to ensure network stability and security. Additionally, make sure to consider the potential impact on your applications and services during route changes.
Sources
Static and dynamic routing in AWS Site-to-Site VPN - AWS Site-to-Site VPN
VPN-IPSEC-Site_to_Site | AWS re:Post
AWS Transit Gateway + AWS Site-to-Site VPN - Amazon Virtual Private Cloud Connectivity Options
