Skip to content

How do I establish an encrypted connection over an AWS Direct Connect connection?

3 minute read
1

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:

  1. Use the Connection wizard to create your Direct Connect dedicated connection.
  2. 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.
  3. Create a new VPN connection to your virtual private gateway or transit gateway.
  4. For Customer gateway, choose Existing, and then select the customer gateway that you created.
  5. 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:

  1. Use the Connection wizard to create your Direct Connect dedicated connection.
  2. For Transit gateway CIDR blocks, specify IPv4 or IPv6 CIDR blocks.
  3. Create a transit virtual interface.
  4. 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.
  5. 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.
  6. Create a new private IP Site-to-Site VPN over Direct Connect to the transit gateway.
  7. 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

AWS OFFICIALUpdated 8 months ago
8 Comments

Why create a public virtual interface? Why not create a private virtual interface?

replied 3 years ago

Thank you for your comment. We'll review and update the Knowledge Center article as needed.

AWS
MODERATOR
replied 3 years ago

Sanity check: Will the bandwidth supported in this solution still be 1.25Gbps as in a regular site-to-site VPN over Internet?

replied 3 years ago

Thank you for your comment. We'll review and update the Knowledge Center article as needed.

AWS
MODERATOR
replied 3 years ago

@Richard: Thank you for your question, you can create AWS Site to Site VPN to Transit Gateway only over a transit VIF or a Public VIF. AWS Site to Site VPN is not supported over a Private VIF.

AWS
EXPERT
replied 2 years ago

@Rafael: Thank you for your question. AWS Site to Site VPN supports bandwidth of upto 1.25Gbps or 140,000 PPS. As long as your underlay network (Direct Connect or Internet) is able to support this bandwidth you should be fine. Please read this blog which talks about optimizing performance for our AWS Site to Site VPN.

AWS
EXPERT
replied 2 years ago

It seems the recommendation provided in the article to ue public VIF is dated. AWS now supports private IP VPNs over transit VIFs, eliminating public IP dependencies. Check this article which for obvious reason is better from security perspective. @ Moderators - Please can you check and update the recommendations accordingly.

AWS
replied 9 months ago

Thank you for your comment. We'll review and update the Knowledge Center article as needed.

AWS
MODERATOR
replied 9 months ago