Direct Connect Encryption
Direct Connect carries traffic unencrypted by default. IPsec VPN over public or transit VIFs and MACsec are the two ways to encrypt it.
Exam tasks: 3.3 (Direct Connect and MACsec), 5.1 (encryption in transit)
The decision: does the link need encryption, and is it a dedicated connection that supports MACsec or one that needs IPsec VPN?
AWS Direct Connect is a dedicated private network path to AWS. Private does not mean encrypted. Traffic is not encrypted by default. Add IPsec at layer 3 or MACsec at layer 2 when policy requires it.
Compare the options
| IPsec VPN over Direct Connect | MACsec | |
|---|---|---|
| OSI layer | 3 (network) | 2 (data link) |
| Scope | End to end between your gateway and the AWS VPN endpoint | Point to point between your router and the AWS device at the location |
| Where | Public VIF to a VPN public endpoint, or private IP VPN over a transit VIF | Dedicated connections and LAGs. Not on hosted connections |
| Speed | A standard VPN tunnel tops out at 1.25 Gbps. Large bandwidth tunnels reach 5 Gbps on a transit gateway. Aggregate tunnels beyond that | Line rate encryption on 10, 100 and 400 Gbps dedicated ports |
| Requirement | Customer gateway device that speaks IPsec | A MACsec capable router. Every Layer 2 hop must support MACsec |
| Keys | IKE negotiated | Static CKN and CAK, 256-bit, you generate and rotate. Up to three pairs for rotation. SAK derived and rotated automatically |
Private IP VPN
Classic encryption over Direct Connect needed a public VIF and public IP addresses for the VPN endpoints. That opened the link to all public AWS services and exposed endpoints to attack.
Private IP VPN builds the IPsec tunnel over a transit VIF with private addresses. It terminates on a transit gateway and uses a Direct Connect gateway. Route limits are also higher than Direct Connect alone.
MACsec modes
| Mode | Behavior |
|---|---|
must_encrypt | Traffic stops if MACsec cannot be established |
should_encrypt | Falls back to unencrypted if negotiation fails. Default for a new MACsec connection |
Exam signal
"Direct Connect traffic must be encrypted at layer 2 on a 10 or 100 Gbps connection": MACsec. "Encrypt site traffic across VPCs through a transit gateway without public IPs": private IP VPN over a transit VIF.
Exam trap
Direct Connect alone does not satisfy "encrypted in transit". Also, MACsec ends at the Direct Connect location edge, so it is not end-to-end encryption across other network segments.
More on keys and resilience
- You generate a CKN/CAK pair (256-bit), associate it with the connection (AWS stores it in Secrets Manager) and configure the same pair on your router.
- Private and transit virtual interfaces carry traffic in the clear across the cross-connect and provider network.
- For critical workloads use two connections at two locations, with a Site-to-Site VPN as a cheaper backup path.
Exam signal
"Encrypt all traffic on a 100 Gbps dedicated Direct Connect at line rate" is MACsec. "Encrypt traffic over a 1 Gbps hosted connection" is IPsec VPN over Direct Connect (MACsec isn't available on hosted connections). "Encryption end to end from the on-premises router to the VPC" is also VPN over DX, since MACsec only covers the link it runs on.
Scenarios
MACsec encrypts the Direct Connect link at near line rate on dedicated 100 Gbps connections, and must_encrypt drops traffic if the MACsec session fails. should_encrypt falls back to clear text, which breaks the second requirement. IPsec tunnels are limited per tunnel and would need many ECMP tunnels to approach 100 Gbps. Application TLS leaves other traffic on the link unencrypted.
Related
Further reading
VPN Options for AWS Access
Site-to-Site VPN, Client VPN, VPN CloudHub and self-managed VPN appliances. Which to choose for offices, remote users and multi-site links.
AWS Verified Access
Zero-trust, per-request access to private web applications without a VPN, using identity and device trust providers and Cedar policies.