For a Site-to-Site VPN connection on a virtual private gateway that's configured for static routing, you can add or remove static routes from your VPN configuration.
To add or remove a static route using the console
Open the Amazon VPC console at https://console.aws.amazon.com/vpc/
. In the navigation pane, choose Site-to-Site VPN connections.
Select the VPN connection.
-
Choose Edit static routes.
-
Add or remove routes as needed.
-
Choose Save changes.
If you have not enabled route propagation for your route table, you must manually update the routes in your route table to reflect the updated static IP prefixes in your VPN connection. For more information, see (Virtual private gateway) Enable route propagation in your route table.
-
For a VPN connection on a transit gateway, you add, modify, or remove the static routes in the transit gateway route table. For more information, see Transit gateway route tables in Amazon VPC Transit Gateways.
To add a static route using the command line or API
-
CreateVpnConnectionRoute (Amazon EC2 Query API)
-
create-vpn-connection-route
(AWS CLI) -
New-EC2VpnConnectionRoute (AWS Tools for Windows PowerShell)
To delete a static route using the command line or API
-
DeleteVpnConnectionRoute (Amazon EC2 Query API)
-
delete-vpn-connection-route
(AWS CLI) -
Remove-EC2VpnConnectionRoute (AWS Tools for Windows PowerShell)