Certopolis

AWS Certified Solutions Architect – Professional

Direct Connect gateway and virtual interface types for SAP-C03

The AWS Direct Connect guide defines three virtual interfaces. A private one reaches a VPC by private IP addresses. A public one reaches AWS public services. A transit one reaches transit gateways associated with a Direct Connect gateway. A Direct Connect gateway is a global resource that connects one virtual interface to gateways in any Region except the China Regions.

Which virtual interface for which traffic

A private virtual interface carries traffic to a VPC over private IP addresses. It attaches either directly to a virtual private gateway, for a VPC in the same Region, or to a Direct Connect gateway.

A public virtual interface reaches AWS public services over public IP addresses. AWS advertises its own prefixes over it, which include Amazon S3, the API endpoints of AWS services and the public addresses of EC2 instances. It gives no access to prefixes that are not Amazon's. This is the interface that carries calls to public service endpoints over the connection instead of the internet.

A transit virtual interface reaches one or more transit gateways that are associated with a Direct Connect gateway. It works on any dedicated or hosted connection of any speed. One connection can carry several virtual interfaces, each with its own VLAN tag, so private and public traffic can share one connection on separate interfaces.

What a Direct Connect gateway adds

A Direct Connect gateway can be associated with virtual private gateways, with transit gateways, or with an AWS Cloud WAN core network. Because it is global, one private virtual interface on a connection in one Region can reach VPCs in other Regions through their virtual private gateways. No second connection is needed, only a virtual interface that ends on the gateway.

With many VPCs, associate the Direct Connect gateway with a transit gateway in each Region and use a transit virtual interface. Transit gateways in different Regions need unique ASNs. A Direct Connect gateway cannot be attached to a transit gateway while it is already associated with a virtual private gateway or attached to a private virtual interface, so the two patterns need separate Direct Connect gateways.

The gateway works as a set of BGP route reflectors and sits outside the data path. AWS states that it is highly available by design and that multiple Direct Connect gateways are not needed for availability. Associations on the same gateway do not send traffic to each other, for example one virtual private gateway to another. The exception is when the on-premises router advertises a supernet that covers the VPCs.

The gateway can serve other accounts. The owner of a virtual private gateway or transit gateway sends an association proposal, and the Direct Connect gateway owner accepts it and can override the allowed prefixes. For a transit gateway association, the allowed prefixes list is what AWS advertises to the on-premises network.

Resiliency models and VPN backup

The Direct Connect Resiliency Toolkit offers three models. Maximum resiliency uses separate connections on separate devices in more than one location, targets a 99.99% SLA, and covers device, connectivity and complete location failures. High resiliency uses two single connections to multiple locations and targets 99.9%. Development and test uses separate connections on separate devices in one location. It covers a device failure and does not cover a location failure.

A Site-to-Site VPN connection over the internet is a backup path that does not depend on any Direct Connect location. To keep it idle while Direct Connect is healthy, advertise the same prefixes on both paths. A virtual private gateway applies longest prefix match first. Only for identical prefixes does it prefer BGP routes from Direct Connect over VPN static routes and then VPN BGP routes.

More specific prefixes on the VPN therefore pull traffic onto the VPN even when Direct Connect is up. Equal-cost multipath across VPN tunnels is supported for VPN connections on a transit gateway. It is not supported on a virtual private gateway.

Where the exam catches people

  • Believing a private or transit virtual interface reaches public service endpoints such as Amazon S3 or DynamoDB APIs: AWS advertises its public prefixes only over a public virtual interface.
  • Believing a private virtual interface attached straight to a virtual private gateway can reach a VPC in another Region: that attachment is for a VPC in the same Region. Use a Direct Connect gateway.
  • Believing one Direct Connect gateway can hold virtual private gateway associations and a transit gateway association together: AWS does not allow the transit gateway association on such a gateway.
  • Believing the Development and test model survives the loss of a Direct Connect location: both connections end in one location.
  • Believing more specific routes on the backup VPN are harmless: longest prefix match is applied before the Direct Connect preference, so the VPN takes the traffic.

Written from these sources

Try 3 questions on this

Pick an answer to see why each option is right or wrong.

  1. A logistics company has a 10 Gbps AWS Direct Connect dedicated connection from its data center. It runs 25 VPCs in us-east-1 and 15 VPCs in eu-west-1, and each Region has a transit gateway with all of that Region's VPCs attached. The data center must reach every VPC by private IP address. The data center must also reach the public endpoints of Amazon DynamoDB and Amazon Simple Queue Service (Amazon SQS) over the same connection instead of the internet. Which combination of steps should a solutions architect take to meet these requirements? (Select TWO.)

    Right. In the game that’s Renown for your Architecture Design and Implementation Built for the Cloud building.

    Not that one: C,D is right. In the game your Architecture Design and Implementation Built for the Cloud building would lose a little Renown, and this question would come back later.

    Show the full explanation and doc quotes

    That gateway is a global resource, which lets the us-east-1 and eu-west-1 transit gateways both be associated with it, and every VPC becomes reachable by private address. DynamoDB and Amazon SQS answer on public AWS addresses, so the second piece is a public virtual interface, over which AWS advertises its public prefixes, service API endpoints included, to the data center router.

    Written from docs.aws.amazon.com/directconnect/latest/UserGuide/WorkingWithVirtualInterfaces.html

  2. A retailer's data center connects to AWS through one AWS Direct Connect dedicated connection at a location that serves us-east-1. A private virtual interface on that connection is attached directly to the virtual private gateway of the company's only VPC, which is in us-east-1. The company is building a second VPC in ap-southeast-2. The data center must reach it by private IP address over the same connection, and no additional connection will be ordered. Which solution will meet these requirements?

    Right. In the game that’s Renown for your Architecture Design and Implementation Built for the Cloud building.

    Not that one: D is right. In the game your Architecture Design and Implementation Built for the Cloud building would lose a little Renown, and this question would come back later.

    Show the full explanation and doc quotes

    Associating both VPCs' virtual private gateways with the gateway lets the existing connection carry traffic to us-east-1 and ap-southeast-2 alike. Only a new virtual interface is needed, not a new connection.

    Written from docs.aws.amazon.com/directconnect/latest/UserGuide/direct-connect-gateways-intro.html

  3. An insurer's data center reaches a production VPC in us-east-1 through one AWS Direct Connect connection. A private virtual interface ends on the VPC's virtual private gateway, and the data center advertises 10.20.0.0/16 to AWS over BGP. A resilience audit finds that the data center would lose all connectivity to the VPC if that Direct Connect location failed. The company accepts reduced bandwidth during such a failure. While the Direct Connect connection is healthy, the VPC must send all traffic for the data center over it. Which combination of steps should a solutions architect take to meet these requirements? (Select TWO.)

    Right. In the game that’s Renown for your Architecture Design and Implementation Built for the Cloud building.

    Not that one: B,E is right. In the game your Architecture Design and Implementation Built for the Cloud building would lose a little Renown, and this question would come back later.

    Show the full explanation and doc quotes

    The VPN must then stay idle while Direct Connect is healthy. The virtual private gateway picks routes by longest prefix first, and only for identical prefixes does it prefer routes learned over Direct Connect. Advertising the same /16 over the VPN leaves Direct Connect preferred; advertising /24s would pull traffic onto the VPN.

    Written from docs.aws.amazon.com/directconnect/latest/UserGuide/resiliency_toolkit.html

Ask for something