Skip to main content
This topic describes the API procedure to create a VXC from an MCR to AWS Direct Connect, including how to look up AWS interconnect locations and order VXCs. You can set up two types of AWS connections from an MCR; an AWS Hosted VIF and an AWS Hosted Connection.
  • Hosted VIF – Connects to public or private AWS cloud services. Hosted VIFs are fully integrated with AWS and provide access to routing information for automatic configuration of your MCR BGP peering.
  • Hosted Connection – Supports one private, public, or transit virtual interface. The Hosted Connection configuration process does not have automatic access to routing information for the MCR, so you need to configure routing manually and specify BGP peering details on both the AWS virtual interface and the MCR A-End configuration.
The MCR to AWS deployment includes these tasks:
  1. Look up AWS port location details To create a VXC to AWS, you first need to identify the productUid of the AWS port to which you want to connect.
  2. Create and deploy a VXC With the port details identified, you can create the VXC to AWS from the MCR.
Before you begin, obtain a valid access token. For more information, see Creating an API Key.

Look up AWS port location details

Use the API to look up the productUid of the AWS port you want to connect to. The response includes details of the available ports. You need the port details to create the VXC. The connectType indicates the type of connection:
  • AWS – Hosted VIF
  • AWSHC – Hosted Connection
To look up AWS port location details
  1. Make a GET request to the Partner Megaports endpoint.
    This request returns all the interfaces Megaport has with Cloud Service Providers (CSPs). In the response, locate the required port by searching on location, data center, or other parameter. You can filter the results by connectType and vxcPermitted. For Hosted VIF connections:
    For Hosted Connections:
    In the response, available ports that accept VXCs are listed as "vxcPermitted": true.
Here is a sample response for a Hosted VIF port in the EU (Ireland) region:
Here is a sample response for a Hosted Connection port with diversity zone information:
[DZ-RED] and [DZ-BLUE] indicate diversity zones. Each AWS Hosted Connection site provides two diversity zones to provide redundancy.

Creating a VXC with a Hosted VIF

With the port details from the GET Partner Megaports endpoint, you can create a VXC with a Hosted VIF. For Hosted VIF connections, Megaport can set up the IP addressing and BGP details on both the MCR and the AWS side, ensuring a working BGP setup. This autoconfiguration is triggered when the interfaces key in partnerConfig does not exist or is null. To create the VXC
  1. Create a request with this URL:
    To test your request before you order, you can use: POST {baseUrl}/v3/networkdesign/validate
  2. Create the Body of the request with the configuration details.

Hosted VIF with autoconfiguration

Use this template to create a Hosted VIF with automatic BGP configuration. The interfaces key is omitted, which triggers autoconfiguration:
The type field specifies the VIF type:
  • private – Access private AWS services such as a VPC, EC2 instances, load balancers, and RDS DB instances on private IP address space.
  • public – Access public AWS services such as Amazon S3, DynamoDB, CloudFront, and Glacier. You will also receive Amazon’s global IP prefixes.

Hosted VIF with manual configuration

If you need more control over the BGP configuration, you can specify the interfaces array in the A-End partnerConfig:

B-End partnerConfig fields for Hosted VIF

Creating a VXC with a Hosted Connection

Hosted Connections support private, public, and transit virtual interfaces. Because Hosted Connections do not have automatic access to routing information, you need to configure BGP peering details manually. To create the VXC
  1. Create a request with this URL:
    To test your request before you order, you can use: POST {baseUrl}/v3/networkdesign/validate
  2. Create the Body of the request with the configuration details.
Use this template to create a Hosted Connection:

B-End partnerConfig fields for Hosted Connection

Static routes and BGP connections

You can create static routes and BGP connections per interface by adding ipRoutes and bgpConnections arrays to the interfaces array of the A-End partner configuration object. For detailed information about configuring static routes and BGP connections, including field descriptions and examples, see Creating an MCR VXC with the API.

Example successful order response

Here is a sample response for a successful Hosted VIF order:

Accepting the connection in AWS

After you create the VXC, you need to accept the connection in the AWS console. For Hosted VIF
  1. In the AWS console, go to Direct Connect > Virtual Interfaces.
  2. Click the ID of the interface to display the configuration and peering details.
  3. Click Accept.
  4. For private VIFs, select the gateway type and the specific gateway for the new virtual interface.
  5. Click Accept virtual interface.
The state of the connection changes from confirming to pending, and then changes to available once BGP has established.
Public VIFs require manual verification by Amazon, which can take up to 72 hours.
For Hosted Connection
  1. In the AWS console, go to Direct Connect > Connections.
  2. Click the connection name to review the details.
  3. Click Accept.
  4. After the connection is accepted, click Create Virtual Interface and create a virtual interface for the hosted connection.
When you create the virtual interface in AWS, make sure the BGP peering values match the configuration you specified in the MCR A-End. For more information about creating virtual interfaces in AWS, see the AWS Direct Connect documentation.
Last modified on August 21, 2026