Skip to content

Commit 184cfa0

Browse files
chore: add PrivateLink docs
1 parent bb2b380 commit 184cfa0

File tree

1 file changed

+114
-8
lines changed

1 file changed

+114
-8
lines changed

src/langsmith/cloud.mdx

Lines changed: 114 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -167,15 +167,121 @@ The LangChain endpoints map to the following static IP addresses for traffic tha
167167

168168
You may need to allowlist these to enable traffic from your private network to LangSmith SaaS endpoints (`api.smith.langchain.com`, `smith.langchain.com`, `beacon.langchain.com`, `eu.api.smith.langchain.com`, `eu.smith.langchain.com`, `eu.beacon.langchain.com`, `aws.api.smith.langchain.com`, `aws.smith.langchain.com`).
169169

170-
### Private Service Connect (Enterprise)
170+
### Private connectivity (Enterprise)
171171

172172
<Callout icon="lock" color="#4F46E5" iconType="regular">
173-
**Enterprise only.** Private Service Connect is available exclusively for Enterprise customers. Contact your account representative or [sales@langchain.dev](mailto:sales@langchain.dev) to enable this feature.
173+
**Enterprise only.** Private connectivity is available exclusively for Enterprise customers. Contact your account representative or [sales@langchain.dev](mailto:sales@langchain.dev) to enable this feature.
174174
</Callout>
175175

176+
Enterprise customers can connect to LangSmith without exposing traffic to the public internet using **AWS PrivateLink** or **GCP Private Service Connect (PSC)**.
177+
178+
#### AWS PrivateLink
179+
180+
Customers on **AWS** can connect to LangSmith via [AWS PrivateLink](https://docs.aws.amazon.com/vpc/latest/privatelink/), providing private connectivity from any VPC in any US region (`us-east-1`, `us-east-2`, `us-west-1`, `us-west-2`). Cross-region connectivity is supported natively — no VPC peering or Transit Gateway required.
181+
182+
##### Endpoint service name
183+
184+
| Region | Service Name |
185+
|--------|-------------|
186+
| US (`us-east-2`) | `<LANGSMITH_PRIVATELINK_SERVICE_NAME>` |
187+
188+
##### Setup
189+
190+
**1. Request access:** Contact your account representative or [sales@langchain.dev](mailto:sales@langchain.dev) with your AWS account ID. LangChain will add your account to the endpoint service's allowed principals list.
191+
192+
**2. Create an Interface VPC Endpoint** in your AWS account:
193+
194+
<CodeGroup>
195+
```bash AWS CLI
196+
aws ec2 create-vpc-endpoint \
197+
--vpc-id <YOUR_VPC_ID> \
198+
--service-name <SERVICE_NAME_FROM_TABLE_ABOVE> \
199+
--vpc-endpoint-type Interface \
200+
--subnet-ids <YOUR_SUBNET_IDS> \
201+
--security-group-ids <YOUR_SECURITY_GROUP_ID> \
202+
--region <YOUR_REGION>
203+
```
204+
205+
```hcl Terraform
206+
resource "aws_vpc_endpoint" "langsmith" {
207+
vpc_id = "<YOUR_VPC_ID>"
208+
service_name = "<SERVICE_NAME_FROM_TABLE_ABOVE>"
209+
vpc_endpoint_type = "Interface"
210+
subnet_ids = ["<YOUR_SUBNET_IDS>"]
211+
security_group_ids = ["<YOUR_SECURITY_GROUP_ID>"]
212+
}
213+
```
214+
</CodeGroup>
215+
216+
**3. Wait for acceptance.** LangChain will accept the connection. The endpoint status will change from `pendingAcceptance` to `available`.
217+
218+
##### Configure DNS
219+
220+
Create a Route 53 Private Hosted Zone so LangSmith API hostnames resolve to your endpoint's private IPs:
221+
222+
<CodeGroup>
223+
```bash AWS CLI
224+
# Create a private hosted zone
225+
aws route53 create-hosted-zone \
226+
--name aws.api.smith.langchain.com \
227+
--vpc VPCRegion=<YOUR_REGION>,VPCId=<YOUR_VPC_ID> \
228+
--caller-reference langsmith-privatelink-$(date +%s) \
229+
--hosted-zone-config PrivateZone=true
230+
231+
# Get the endpoint's DNS name
232+
ENDPOINT_DNS=$(aws ec2 describe-vpc-endpoints \
233+
--vpc-endpoint-ids <YOUR_ENDPOINT_ID> \
234+
--query 'VpcEndpoints[0].DnsEntries[0].DnsName' \
235+
--output text)
236+
237+
# Add a CNAME record
238+
aws route53 change-resource-record-sets \
239+
--hosted-zone-id <HOSTED_ZONE_ID> \
240+
--change-batch '{
241+
"Changes": [{
242+
"Action": "CREATE",
243+
"ResourceRecordSet": {
244+
"Name": "aws.api.smith.langchain.com",
245+
"Type": "CNAME",
246+
"TTL": 300,
247+
"ResourceRecords": [{"Value": "'$ENDPOINT_DNS'"}]
248+
}
249+
}]
250+
}'
251+
```
252+
253+
```hcl Terraform
254+
resource "aws_route53_zone" "langsmith_privatelink" {
255+
name = "aws.api.smith.langchain.com"
256+
257+
vpc {
258+
vpc_id = "<YOUR_VPC_ID>"
259+
}
260+
}
261+
262+
resource "aws_route53_record" "langsmith_privatelink" {
263+
zone_id = aws_route53_zone.langsmith_privatelink.zone_id
264+
name = "aws.api.smith.langchain.com"
265+
type = "CNAME"
266+
ttl = 300
267+
records = [aws_vpc_endpoint.langsmith.dns_entry[0]["dns_name"]]
268+
}
269+
```
270+
</CodeGroup>
271+
272+
##### Verify connectivity
273+
274+
From an EC2 instance or container in your VPC:
275+
276+
```bash
277+
curl https://aws.api.smith.langchain.com/ok
278+
```
279+
280+
#### GCP Private Service Connect
281+
176282
Enterprise customers on **GCP** can connect to LangSmith via [Private Service Connect (PSC)](https://cloud.google.com/vpc/docs/private-service-connect), providing private connectivity without exposing traffic to the public internet.
177283

178-
#### Service attachment URIs
284+
##### Service attachment URIs
179285

180286
Use the following service attachment URIs to create a PSC endpoint in your VPC:
181287

@@ -184,7 +290,7 @@ Use the following service attachment URIs to create a PSC endpoint in your VPC:
184290
| US (`us-central1`) | `projects/langchain-prod/regions/us-central1/serviceAttachments/gateway-psc-publish` |
185291
| EU (`europe-west4`) | `projects/langchain-prod/regions/europe-west4/serviceAttachments/gateway-psc-publish` |
186292

187-
#### PSC domains
293+
##### PSC domains
188294

189295
After setup, use the following domains to connect to LangSmith over your PSC connection:
190296

@@ -193,13 +299,13 @@ After setup, use the following domains to connect to LangSmith over your PSC con
193299
| US | `us-central1.p.api.smith.langchain.com` |
194300
| EU | `europe-west4.p.api.smith.langchain.com` |
195301

196-
#### Setup
302+
##### Setup
197303

198304
**Request access:** Contact your account representative or [sales@langchain.dev](mailto:sales@langchain.dev) with your GCP project ID. LangChain will add your project to the service attachment's allowed consumer list.
199305

200306
After access is granted, create a PSC endpoint and configure DNS using either the gcloud CLI or Terraform.
201307

202-
#### Create a PSC endpoint
308+
##### Create a PSC endpoint
203309

204310
Create a forwarding rule in your VPC targeting the service attachment:
205311

@@ -232,7 +338,7 @@ resource "google_compute_forwarding_rule" "langsmith_psc" {
232338
```
233339
</CodeGroup>
234340

235-
#### Configure DNS
341+
##### Configure DNS
236342

237343
Create a private DNS zone in your VPC and add an A record pointing to the PSC endpoint IP:
238344

@@ -276,7 +382,7 @@ resource "google_dns_record_set" "langsmith_psc" {
276382
```
277383
</CodeGroup>
278384

279-
#### Verify connectivity
385+
##### Verify connectivity
280386

281387
From a VM in your VPC:
282388

0 commit comments

Comments
 (0)