Private networking
Customers on enterprise plans can connect to Modelbit's inference APIs without traversing the public internet. Using AWS PrivateLink, you can connect your VPC directly to Modelbit and keep all inference traffic within your AWS region.
Connecting to Modelbit using AWS PrivateLink
Contact Modelbit to ensure your AWS region matches your Modelbit region. The Modelbit team will then provide:
- The
VPCE Service Nameyou'll use this when setting up a VPC endpoint. - The
DNS Recordsyou'll need when creating a Private Hosted Zone for your VPC connection.
With this information you're ready to create a VPC Endpoint and Private Hosted Zone.
Create a VPC Endpoint
In your AWS account, create a VPC Endpoint that connects your VPC to Modelbit's VPC Endpoint Service:
- Open the AWS Console to the
VPCsarea - In the left menu, click
EndpointsthenCreate endpoint - Name your endpoint. For example,
modelbit-vpce - Choose
Other endpoint services - Enter the
VPCE Service Namesupplied by Modelbit - Click
Verify serviceto see a greenService name verified.message
Your account is authorized to use Modelbit's VPC Endpoint Service. Next, connect the Endpoint to your VPC.
- Continuing in the same screen, select your
VPC - Check one or more
Subnetsto connect to thisVPC Endpoint - Check one or more
Security Groupsto control which traffic in yourVPCcan connect to thisEndpoint - At the bottom of the screen, click
Create endpoint
Your VPC is connected to Modelbit's VPC Endpoint Service.
Create a Private Hosted Zone
Next, create DNS records for connecting to Modelbit's inference APIs. These records will mask the public DNS records to ensure all inference traffic within this VPC travels over AWS PrivateLink.
- Open the AWS Console to the
Route 53area - In the left menu, click
Hosted zones, thenCreate hosted zone - Name your hosted zone with the value provided by Modelbit. For example,
<your-region>.modelbit.com - Choose
Private hosted zone - Set your
RegionandVPC IDto the VPC that you connected to theEndpoint - Click
Create hosted zone
This hosted zone will provide DNS records to Modelbit via AWS PrivateLink. Next, set the A record needed for routing traffic.
- Click
Create record - Set the
Subdomainto the value provided by Modelbit. For example,your-company - Toggle
Aliasto on, and selectAlias to VPC Endpoint, then pick the Region andVPC Endpointcreated earlier - Click
Create records
Your VPC will now route traffic to Modelbit's inference API over AWS PrivateLink.
Test your private connection
To test the connection, log into a machine in your VPC and use nslookup on Modelbit's inference API host to see that it resolves to a private IP:
$ nslookup your-company.your-region.modelbit.com
Server: 172.31.0.2
Address: 172.31.0.2#53
Non-authoritative answer:
Name: your-company.your-region.modelbit.com
Address: 172.31.10.137
Name: your-company.your-region.modelbit.com
Address: 172.31.23.53
Name: your-company.your-region.modelbit.com
Address: 172.31.37.201
Finally, curl Modelbit's REST API to perform inferences over the PrivateLink connection:
curl -s -XPOST "https://your-company.your-region.modelbit.com/v1/double_number/latest" -d '{"data": 21}'
Remove your private connection
To remove your AWS PrivateLink connection and use Modelbit's inference APIs over the internet:
- Delete the
Arecord andPrivate Hosted Zonecreated earlier. - Delete the
VPC Endpointcreated earlier.
Inference requests within your VPC to Modelbit will use the internet once the DNS records expire from your VPC's cache.