Architecture
We will construct the following architecture:
Prerequisites
VPC
This step is performed on AWS.

Virtual Private Gateway
This step is performed on AWS. Create and attach a virtual private gateway to the VPC created.



VPC Route Table
This step is performed on AWS.


Internet Gateway
This step is performed on AWS. This is optional. Create and attach an internet gateway to the VPC created.





Subnet
This step is performed on AWS. Assuming you don’t have a subnet setup — Choose the VPC created. Subnet CIDR block should be chosen from within the VPC block.
EC2
This step is performed on AWS. Assuming you don’t have an EC2 instance — spin one up in the same region. Assign the VPC and Subnet created previously. Enable public IP on the instance so you can ssh into it.
Account ID
This step is performed on AWS. ⚠️ You would need this number when you create the Telnyx VXC later.
Network
This step is performed on Telnyx. If you don’t have a network created already, you may follow this guide to create one.Procedure
Create a VXC resource
This step is performed on Telnyx.request
BGP auth key: If you supply bgp_key_primary, configure the same MD5 key on the AWS Direct Connect virtual interface BGP peer — both sides must match.
Take note of the VXC id returned in the response.
Direct Connect
This step is performed on AWS. If the connection is not accepted in the user’s AWS account within 1 hour of VXC creation, the VXC is deleted and must be created again.

Enable Routing
This step is performed on Telnyx. The connection must be enabled to be used.request

Virtual Interface
This step is performed on AWS. The connection created above needs to have an interface to which to connect.

Lastly you should see the following – the interface is “available”.

Validate Connection
This step is performed on AWS. SSH into an EC2 instance in the VPC and either ping or traceroute to one of the IPs in the route table of the VPC. You can see the route went over the VXC instead of the public internet.