> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.fabricgateway.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.fabricgateway.ai/_mcp/server.

# Connect to a provider over a private network

> Send LLM traffic to a provider through Fabric's private endpoint instead of the public internet, and set up the AWS role that Fabric assumes.

A private connection sends requests to an LLM provider through Fabric's private endpoint, over AWS PrivateLink, instead of the public internet. Use it when your security requirements don't allow provider traffic to cross the public internet. This topic explains how private connections work and shows you how to create one.

## Prerequisites

Before you begin, make sure you have the following:

* Access to a Fabric AI Gateway organization, with permission to create connections.
* An LLM provider that supports private connections. In the console, the **Network** setting appears only for providers that offer both a public and a private option.
* An AWS role in your own AWS account that has permission to call the provider, and permission to edit that role's trust policy.
* Private connections turned on for your organization. If **Network** doesn't offer **Private**, ask your administrator. If you run your own data plane, see [Turn on private connections for your data plane](#turn-on-private-connections-for-your-data-plane).

## Understand how a private connection works

A private connection differs from a public one in the following ways:

* **Network path:** Fabric routes the connection through its private endpoint and never the public internet. The console doesn't show the endpoint's address.
* **Region:** Private connections work only in the region of Fabric's private endpoint. Use the region that Fabric gives you.
* **Authentication:** A private connection uses your provider's private auth type. It can't use a stored API key or other header credential. Fabric first assumes its own role, and then assumes your role, using an external ID that Fabric sets for your organization. You can't change the external ID.
* **Failure behavior:** A private connection fails closed. If Fabric has no private endpoint for the provider, or the credential isn't the private auth type, requests fail instead of falling back to the public URL.

## Create a private connection

To create a private connection, do the following:

1. In the sidebar, select **LLMs**, and then select the **Providers** tab.

2. Next to your provider, select **Connect**.

3. For **Network**, select **Private**. The form explains that calls go through Fabric's private endpoint, never the public internet, and that it uses your provider's private auth type.

4. For **Region**, select the region that Fabric gave you.

5. Under **Trust setup**, copy the values that you need for your AWS role:

   | Value             | What it is                                                                                    |
   | ----------------- | --------------------------------------------------------------------------------------------- |
   | **Role to trust** | The Fabric role that assumes your role first.                                                 |
   | **External ID**   | The ID that Fabric sends when it assumes your role. Fabric sets it for your organization.     |
   | **Trust policy**  | A ready-made trust policy built from the two values. Select **Copy trust policy** to copy it. |

6. In AWS, update your role's trust policy to the policy that you copied. The role must trust Fabric's role and check the external ID.

7. Back in the form, in **Upstream auth**, enter your role's ARN, for example `arn:aws:iam::123456789012:role/bedrock-access`.

8. Review the rest of the form, as in [Connect an LLM provider](/configure/connections/llm-providers), and then select **Create connection**.

The trust policy that Fabric generates looks like the following, with your values filled in:

```json
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Principal": { "AWS": "ROLE_TO_TRUST" },
      "Action": "sts:AssumeRole",
      "Condition": { "StringEquals": { "sts:ExternalId": "EXTERNAL_ID" } }
    },
    {
      "Effect": "Allow",
      "Principal": { "AWS": "ROLE_TO_TRUST" },
      "Action": "sts:SetSourceIdentity"
    }
  ]
}
```

## Confirm that the connection is private

To confirm that a connection is private, open the connection from **LLMs** > **Connections**. The connection's page shows **Private** as its network, and a note that calls go through Fabric's private endpoint, never the public internet. Then send a request through the route, and check it in **Traces**. For the steps, see [Inspect traces](/use/monitor/traces).

## Turn on private connections for your data plane

This section is for administrators who run their own data plane. On a Postman-hosted data plane, Fabric sets this up for you.

Private connections need configuration on both planes:

| Plane         | Setting                                  | What it does                                                                                                                                                                                                                                    |
| ------------- | ---------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Control plane | `FABRIC_GW_PRIVATE_CONNECTION_SERVICES`  | The AWS signing services that accept private connections, as a comma-separated list, for example `bedrock`. When it's empty, private connections are off.                                                                                       |
| Data plane    | `FABRIC_GW_PRIVATE_ENDPOINT_<SERVICE>`   | One HTTPS interface endpoint for each signing service, with the service name in capital letters, for example `FABRIC_GW_PRIVATE_ENDPOINT_BEDROCK`. A service without an endpoint has private connections off, and its private connections fail. |
| Data plane    | `FABRIC_GW_AWS_INTERMEDIATE_ROLE_ARN`    | The role that a private connection assumes first, before your role.                                                                                                                                                                             |
| Data plane    | `FABRIC_GW_SSRF_BLOCK_PRIVATE_UPSTREAMS` | Must be `true`. When it's off, the data plane logs an error at startup, ignores the endpoints, and refuses private connections.                                                                                                                 |

The data plane allows its own private endpoint hosts without an allowlist entry, and refuses them to every connection that isn't a private connection.

## Troubleshoot a private connection

If requests on a private connection fail, check the following:

* **The connection's credential isn't the private auth type.** A header credential or any other mode fails the request. Edit the connection, and use the private auth type.
* **The role doesn't trust Fabric.** Compare your role's trust policy with the **Trust policy** on the form. The role must trust the **Role to trust** and check the **External ID**.
* **The region doesn't match.** Use the region that Fabric gave you.
* **No private endpoint for the provider.** On a self-run data plane, check the `FABRIC_GW_PRIVATE_ENDPOINT_<SERVICE>` setting for the provider's signing service.

## Next steps

* To connect the provider publicly instead, see [Connect an LLM provider](/configure/connections/llm-providers).
* To add fallback to a second provider, see [Set up failover](/configure/routing/failover).