docs/v3/how-to-guides/cloud/manage-users/secure-access-by-private-link.mdx
PrivateLink is an available upgrade to certain Enterprise plans. PrivateLink enables account administrators to route API and UI traffic to Prefect Cloud through AWS, keeping it off the public internet. Traffic between your network and Prefect Cloud is encrypted end-to-end.
To learn more, please contact your account manager or the Prefect team at [email protected].
The Prefect team will provide you with two VPC Endpoint Service names (one for the API, one for the UI). Create a VPC Endpoint in your AWS account for each service you want to use.
Provide the following information to Prefect so the connection can be accepted:
us-east-1)Prefect will review and accept the connection.
Once the connection is accepted, enable Private DNS on each VPC Endpoint. This allows your VPC to resolve the Prefect private endpoints automatically.
Without Private DNS enabled, DNS queries for api.private.prefect.cloud and app.private.prefect.cloud will return NXDOMAIN.
Run these commands from within the VPC that has the VPC Endpoints configured.
DNS resolution (should return private 10.x.x.x IPs):
nslookup api.private.prefect.cloud
nslookup app.private.prefect.cloud
API health check (should return HTTP 200):
curl -i https://api.private.prefect.cloud/api/health
UI health check (should return HTTP 200):
curl -i https://app.private.prefect.cloud/private-ui/health
Set PREFECT_CLOUD_API_URL and PREFECT_CLOUD_UI_URL to the private endpoints:
prefect config set PREFECT_CLOUD_API_URL="https://api.private.prefect.cloud/api"
prefect config set PREFECT_CLOUD_UI_URL="https://app.private.prefect.cloud"
prefect cloud login -k <your-api-key>
prefect cloud workspace ls
PREFECT_CLOUD_UI_URL is inferred automatically from PREFECT_CLOUD_API_URL in most cases, but setting it explicitly ensures that UI links in logs and CLI output point to the private UI endpoint.
Workers and other Prefect clients running inside your VPC will use these endpoints automatically once configured.
If nslookup api.private.prefect.cloud or nslookup app.private.prefect.cloud returns NXDOMAIN, Private DNS is not enabled on the VPC Endpoint or the command is being run from outside the VPC. In the AWS console, navigate to VPC > Endpoints, select the endpoint, and confirm Private DNS names enabled is true. If it is not enabled, modify the endpoint to enable it.
In the AWS console, navigate to VPC > Endpoints and check the Status column. If the status is "Pending", Prefect has not yet accepted the connection. Contact your Prefect team. If the status is "Rejected" or "Failed", the endpoint may need to be recreated.
nslookup api.private.prefect.cloud or nslookup app.private.prefect.cloud to confirm DNS resolves.