Subchapter 90.4
references/encrypting-traffic-over-direct-connect.mdMarkdown10 KBView on GitHub
Domain expertise for encrypting traffic in transit over Direct Connect, which is not encrypted by default. Covers the two main options (MAC Security and a Site-to-Site VPN over the connection), the recommended private IP Site-to-Site VPN over a transit virtual interface, the MACsec prerequisites and the boundary of what it actually protects, and the fact that MACsec is also available on partner connections.
Does not cover choosing the connection model, creating the virtual interface and BGP (a separate reference), reaching many VPCs, or resiliency. Those are separate references.
Execute commands using the AWS MCP server when connected (sandboxed execution, audit logging,
observability). Fall back to the AWS CLI otherwise. The Direct Connect console is regional; pass the
customer’s working --region on every aws directconnect command.
Constraints:
| Option | Layer | Where it applies | Use when |
|---|---|---|---|
| MAC Security (MACsec) | Layer 2 | Point-to-point over the cross connect, between the customer edge device and the Direct Connect edge device | 10/100 Gbps dedicated (at select locations), or a partner connection where the partner sources it; the customer has a MACsec-capable router |
| Site-to-Site VPN | Layer 3 (IPsec) | An encrypted tunnel over the connection | The customer wants IPsec encryption, especially a private IP VPN to a transit gateway |
Constraints:
Constraints:
Constraints:
--secret-arn, never
passing the values inline or storing them in plaintext config. You SHOULD scope a resource policy on
that secret to only the principals that need to manage the MACsec key, and include aws:SourceArn or
aws:SourceAccount condition keys to restrict access to only the Direct Connect connection(s) that
need the key and prevent confused-deputy scenarios.Direct Connect is not encrypted by default. Stop and choose MACsec or a Site-to-Site VPN.
MACsec must be enabled at connection creation. Delete and recreate the connection with MACsec, or use a Site-to-Site VPN instead.
MACsec is available on partner connections too, sourced on the partner interconnect. Engage the partner.
MACsec protects only the point-to-point cross connect at Layer 2. For end-to-end, layer a Site-to-Site VPN on top.
This procedure confirms encryption is needed, picks MACsec or a Site-to-Site VPN against the customer’s connection, and sets it up, surfacing the console link to verify.
macsec or vpn.Constraints for parameter acquisition:
Constraints:
aws sts get-caller-identity.aws sts assume-role)
rather than long-lived IAM user access keys for Direct Connect management operations.Constraints:
You MUST associate the MACsec key from Secrets Manager with the connection (the connection must have been created with MACsec enabled):
aws directconnect associate-mac-sec-key --connection-id {connection_id} \
--secret-arn {secret_arn} --region {region}You MUST verify MACsec status:
aws directconnect describe-connections --connection-id {connection_id} --region {region}Constraints:
You MUST set up the Site-to-Site VPN over the connection, preferring the private IP VPN over a transit virtual interface to a transit gateway when the customer is reaching a transit gateway. For the private IP path, create the VPN connection against the transit gateway and customer gateway with private outside addressing (delegate the full Site-to-Site VPN setup to the sitetositevpn skill for customer/transit gateway creation and tunnel options):
aws ec2 create-vpn-connection --type ipsec.1 --customer-gateway-id {cgw_id} \
--transit-gateway-id {tgw_id} \
--options '{"TunnelInsideIpVersion":"ipv4","OutsideIpAddressType":"PrivateIpv4","TransportTransitGatewayAttachmentId":"{transit_vif_attachment_id}"}' \
--region {region}You MUST confirm BGP preference so the VPN behaves as intended (backup or primary) for the customer’s design.
Constraints:
You MUST present the relevant Direct Connect console link to verify. For the virtual interface
carrying the VPN, fill {virtual_interface_id} and {region}:
https://console.aws.amazon.com/directconnect/v2/home?region={region}#/virtual-interfaces/{virtual_interface_id}You SHOULD recommend CloudWatch alarms on MACsec key status or VPN tunnel status, and confirm
CloudTrail is capturing directconnect API calls with log file validation enabled and the trail
encrypted with a KMS key, and any CloudWatch Logs log groups receiving these events or alarm state
data encrypted with a KMS key, so state changes trigger alerts and configuration changes are audited
with assured log integrity and confidentiality rather than relying on manual detection.
You SHOULD ensure any SNS topics receiving Direct Connect alarm notifications are encrypted with a KMS key and that subscriptions are restricted to authorized operations personnel.
aws sts assume-role) for Direct Connect management operations rather than long-lived
IAM user access keys.directconnect API actions to the
specific actions and resource ARNs each principal needs, and MUST NOT grant directconnect:* on
resource * or attach any *FullAccess managed policy.