I want to establish an encrypted connection from my local network to my Amazon Virtual Private Cloud (Amazon VPC) over an AWS Direct Connect connection.
Short description
To encrypt traffic over an AWS Direct Connect connection, use one of the following methods:
To build a Site-to-Site VPN over Direct Connect to Amazon VPC, use a Direct Connect public virtual interface. To build a Site-to-Site VPN between on-premises equipment and AWS Transit Gateway, use a Direct Connect transit virtual interface.
Network to Amazon VPC supports several connectivity options.
Resolution
Note: If you receive errors when you run AWS Command Line Interface (AWS CLI) commands, then see Troubleshooting errors for the AWS CLI. Also, make sure that you're using the most recent AWS CLI version.
Use MACsec
To use MACsec, see Get started using MACsec on a dedicated AWS Direct Connect connection.
Create a Site-to-Site VPN over a public virtual interface
Complete the following steps:
- Use the Connection wizard to create your Direct Connect dedicated connection.
- Create a Direct Connect public virtual interface. For Prefixes you want to advertise, enter your Site-to-Site VPN customer gateway device's public IP address and the network prefixes that you want to advertise.
Note: Your public virtual interface receives all AWS public IP address prefixes from each AWS Region except the AWS China Region. These include the public IP addresses of AWS managed VPN endpoints. Use Border Gateway Protocol (BGP) communities to filter prefixes by local Region or all Regions of a continent.
- Create a new VPN connection to your virtual private gateway or transit gateway.
- For Customer gateway, choose Existing, and then select the customer gateway that you created.
- Configure your customer gateway device to create the VPN tunnels. You can use the Amazon VPC console or AWS CLI to download the example configuration file.
Create a Site-to-Site VPN over a transit virtual interface
Complete the following steps:
- Use the Connection wizard to create your Direct Connect dedicated connection.
- For Transit gateway CIDR blocks, specify IPv4 or IPv6 CIDR blocks.
- Create a transit virtual interface.
- In the transit virtual interface configuration, select an existing Direct Connect gateway, or create a new one.
Note: You can't associate a Direct Connect gateway with a virtual private gateway and transit gateway at same point of time.
- Associate your Direct Connect gateway to your transit gateway. Make sure that you announce the transit gateway CIDR block to your local network through allowed prefixes.
- Create a new private IP Site-to-Site VPN over Direct Connect to the transit gateway.
- Configure your customer gateway device to create the VPN tunnels. You can use the Amazon VPC console or AWS CLI to download the example configuration file.
Related information
Troubleshooting AWS Direct Connect
AWS Site-to-Site VPN logs
Monitor an AWS Site-to-Site VPN connection